git sucks
This commit is contained in:
@@ -50,7 +50,9 @@ export function addGameApis(app, jsonParser) {
|
||||
|
||||
app.post('/api/game/:gameId/apps', async (req, res) => {
|
||||
try {
|
||||
const apps = await App.findAll({ where: { gameId: req.params['gameId'] } })
|
||||
const apps = await App.findAll({
|
||||
include: { model: Character, as: "appliedCharacter"},
|
||||
where: { gameId: req.params['gameId'] } })
|
||||
if (!apps) {
|
||||
res.status(404).send('Apps not found.')
|
||||
} else {
|
||||
@@ -63,7 +65,9 @@ export function addGameApis(app, jsonParser) {
|
||||
|
||||
app.post('/api/game/:gameId/picks', async (req, res) => {
|
||||
try {
|
||||
const picks = await Pick.findAll({ where: { gameId: req.params['gameId'] } })
|
||||
const picks = await Pick.findAll({
|
||||
include: { model: Character, as: "pickedCharacter"},
|
||||
where: { gameId: req.params['gameId'] } })
|
||||
if (!picks) {
|
||||
res.status(404).send('Picks not found')
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user