git sucks
This commit is contained in:
1 parent
79db675a6a
commit
65378473e0
3 files changed
+12
-6
No files matched your search
@@ -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