WIP Functionality to request wines for next lottery #24

Merged
Adrianht merged 23 commits from feat/request-wine into master 2020-09-07 14:28:31 +00:00
3 changed files with 1 additions and 4 deletions
Showing only changes of commit 2764972abd - Show all commits

View File

@@ -1,6 +1,4 @@
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
const express = require("express");
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
const path = require("path");
// const router = express.Router();
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
const mongoose = require("mongoose");
mongoose.connect("mongodb://localhost:27017/vinlottis", {
useNewUrlParser: true
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed

View File

@@ -1,7 +1,6 @@
KevinMidboe commented 2020-09-07 14:00:35 +00:00 (Migrated from github.com)
Review

Is this used?

Is this used?
KevinMidboe commented 2020-09-07 14:00:35 +00:00 (Migrated from github.com)
Review

Is this used?

Is this used?
Adrianht commented 2020-09-07 14:23:56 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:56 +00:00 (Migrated from github.com)
Review

fixed

fixed
const fetch = require('node-fetch')
KevinMidboe commented 2020-09-04 10:37:03 +00:00 (Migrated from github.com)
Review

Change to 500x500

Change to 500x500
KevinMidboe commented 2020-09-07 08:25:16 +00:00 (Migrated from github.com)
Review

Refactor this document to reflect changes to backend route setup.

TODO:

  • Define this endpoint in /api/router.js (e.g. /wineinfo/search).
  • Change this to be a named anonymous function.
  • Export this function at bottom of doc. (e.g. `module.exports = { NAME_OF_FUNCTION, NAME_OF_FUNCTION_2, ... }
Refactor this document to reflect changes to backend route setup. TODO: - Define this endpoint in `/api/router.js` (e.g. `/wineinfo/search`). - Change this to be a named anonymous function. - Export this function at bottom of doc. (e.g. `module.exports = { NAME_OF_FUNCTION, NAME_OF_FUNCTION_2, ... }
const path = require('path')
const config = require(path.join(__dirname + "/../config/env/lottery.config"));
const mustBeAuthenticated = require(path.join(__dirname + "/../middleware/mustBeAuthenticated"))
KevinMidboe commented 2020-09-07 14:00:35 +00:00 (Migrated from github.com)
Review

Is this used?

Is this used?
Adrianht commented 2020-09-07 14:23:56 +00:00 (Migrated from github.com)
Review

fixed

fixed
const convertToOurWineObject = wine => {
if(wine.basic.ageLimit === "18"){
KevinMidboe commented 2020-09-07 14:00:35 +00:00 (Migrated from github.com)
Review

Is this used?

Is this used?
KevinMidboe commented 2020-09-07 14:00:35 +00:00 (Migrated from github.com)
Review

Is this used?

Is this used?
Adrianht commented 2020-09-07 14:23:56 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:56 +00:00 (Migrated from github.com)
Review

fixed

fixed

View File

@@ -29,7 +29,7 @@ export default {
KevinMidboe commented 2020-09-07 08:29:47 +00:00 (Migrated from github.com)
Review

This is in the template which is scoped to this so we can write: wines == undefined. Also the length of a list will not be less that zero so change check to be wines.length == 0.

This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
KevinMidboe commented 2020-09-07 08:29:47 +00:00 (Migrated from github.com)
Review

This is in the template which is scoped to this so we can write: wines == undefined. Also the length of a list will not be less that zero so change check to be wines.length == 0.

This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
KevinMidboe commented 2020-09-07 08:31:38 +00:00 (Migrated from github.com)
Review

Shorthand would be this.wines = await allRequestedWines() || [];

Shorthand would be `this.wines = await allRequestedWines() || [];`
KevinMidboe commented 2020-09-07 08:31:38 +00:00 (Migrated from github.com)
Review

Shorthand would be this.wines = await allRequestedWines() || [];

Shorthand would be `this.wines = await allRequestedWines() || [];`
KevinMidboe commented 2020-09-07 08:33:01 +00:00 (Migrated from github.com)
Review

Could the item deleted be sent up here and we filter it away instead of making a new request?

Could the item deleted be sent up here and we filter it away instead of making a new request?
KevinMidboe commented 2020-09-07 08:33:01 +00:00 (Migrated from github.com)
Review

Could the item deleted be sent up here and we filter it away instead of making a new request?

Could the item deleted be sent up here and we filter it away instead of making a new request?
Adrianht commented 2020-09-07 13:55:41 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:41 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:47 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:47 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
KevinMidboe commented 2020-09-07 14:01:34 +00:00 (Migrated from github.com)
Review
      [this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```suggestion [this.wines, this.isAdmin] = await allRequestedWines() || [[], false] ```
KevinMidboe commented 2020-09-07 14:01:34 +00:00 (Migrated from github.com)
Review
      [this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```suggestion [this.wines, this.isAdmin] = await allRequestedWines() || [[], false] ```
Adrianht commented 2020-09-07 14:24:02 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:24:02 +00:00 (Migrated from github.com)
Review

fixed

fixed
this.wines = this.wines.filter(item => item.wine._id !== wine._id)
},
async refreshData(){
[this.wines, this.isAdmin] = await allRequestedWines() || []
KevinMidboe commented 2020-09-07 08:29:47 +00:00 (Migrated from github.com)
Review

This is in the template which is scoped to this so we can write: wines == undefined. Also the length of a list will not be less that zero so change check to be wines.length == 0.

This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
KevinMidboe commented 2020-09-07 08:31:38 +00:00 (Migrated from github.com)
Review

Shorthand would be this.wines = await allRequestedWines() || [];

Shorthand would be `this.wines = await allRequestedWines() || [];`
KevinMidboe commented 2020-09-07 08:33:01 +00:00 (Migrated from github.com)
Review

Could the item deleted be sent up here and we filter it away instead of making a new request?

Could the item deleted be sent up here and we filter it away instead of making a new request?
Adrianht commented 2020-09-07 13:55:41 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:47 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
KevinMidboe commented 2020-09-07 14:01:34 +00:00 (Migrated from github.com)
Review
      [this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```suggestion [this.wines, this.isAdmin] = await allRequestedWines() || [[], false] ```
Adrianht commented 2020-09-07 14:24:02 +00:00 (Migrated from github.com)
Review

fixed

fixed
[this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
KevinMidboe commented 2020-09-07 08:29:47 +00:00 (Migrated from github.com)
Review

This is in the template which is scoped to this so we can write: wines == undefined. Also the length of a list will not be less that zero so change check to be wines.length == 0.

This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
KevinMidboe commented 2020-09-07 08:31:38 +00:00 (Migrated from github.com)
Review

Shorthand would be this.wines = await allRequestedWines() || [];

Shorthand would be `this.wines = await allRequestedWines() || [];`
KevinMidboe commented 2020-09-07 08:33:01 +00:00 (Migrated from github.com)
Review

Could the item deleted be sent up here and we filter it away instead of making a new request?

Could the item deleted be sent up here and we filter it away instead of making a new request?
Adrianht commented 2020-09-07 13:55:41 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:47 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
KevinMidboe commented 2020-09-07 14:01:34 +00:00 (Migrated from github.com)
Review
      [this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```suggestion [this.wines, this.isAdmin] = await allRequestedWines() || [[], false] ```
Adrianht commented 2020-09-07 14:24:02 +00:00 (Migrated from github.com)
Review

fixed

fixed
}
},
mounted() {
KevinMidboe commented 2020-09-07 08:29:47 +00:00 (Migrated from github.com)
Review

This is in the template which is scoped to this so we can write: wines == undefined. Also the length of a list will not be less that zero so change check to be wines.length == 0.

This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
KevinMidboe commented 2020-09-07 08:29:47 +00:00 (Migrated from github.com)
Review

This is in the template which is scoped to this so we can write: wines == undefined. Also the length of a list will not be less that zero so change check to be wines.length == 0.

This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
KevinMidboe commented 2020-09-07 08:31:38 +00:00 (Migrated from github.com)
Review

Shorthand would be this.wines = await allRequestedWines() || [];

Shorthand would be `this.wines = await allRequestedWines() || [];`
KevinMidboe commented 2020-09-07 08:31:38 +00:00 (Migrated from github.com)
Review

Shorthand would be this.wines = await allRequestedWines() || [];

Shorthand would be `this.wines = await allRequestedWines() || [];`
KevinMidboe commented 2020-09-07 08:33:01 +00:00 (Migrated from github.com)
Review

Could the item deleted be sent up here and we filter it away instead of making a new request?

Could the item deleted be sent up here and we filter it away instead of making a new request?
KevinMidboe commented 2020-09-07 08:33:01 +00:00 (Migrated from github.com)
Review

Could the item deleted be sent up here and we filter it away instead of making a new request?

Could the item deleted be sent up here and we filter it away instead of making a new request?
Adrianht commented 2020-09-07 13:55:41 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:41 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:47 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:47 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
KevinMidboe commented 2020-09-07 14:01:34 +00:00 (Migrated from github.com)
Review
      [this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```suggestion [this.wines, this.isAdmin] = await allRequestedWines() || [[], false] ```
KevinMidboe commented 2020-09-07 14:01:34 +00:00 (Migrated from github.com)
Review
      [this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```suggestion [this.wines, this.isAdmin] = await allRequestedWines() || [[], false] ```
Adrianht commented 2020-09-07 14:24:02 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:24:02 +00:00 (Migrated from github.com)
Review

fixed

fixed