refining apps & picks
This commit is contained in:
@@ -97,31 +97,26 @@ app.post('/api/game', jsonParser, async (req, res) => {
|
||||
|
||||
app.get('/api/game/:gameId', async (req, res) => {
|
||||
const game = await Game.findOne({ where: { id: req.params['gameId'] } })
|
||||
console.log(game)
|
||||
res.send(game)
|
||||
})
|
||||
|
||||
app.post('/api/game/:gameId/apps', async (req, res) => {
|
||||
const apps = await App.findAll({ where: { gameId: req.params['gameId'] } })
|
||||
console.log(apps)
|
||||
res.send(apps)
|
||||
})
|
||||
|
||||
app.post('/api/character/:characterId/apps', async (req, res) => {
|
||||
const apps = await App.findAll({ where: { characterId: req.params['characterId'] } })
|
||||
console.log(apps)
|
||||
res.send(apps)
|
||||
})
|
||||
|
||||
app.post('/api/game/:gameId/picks', async (req, res) => {
|
||||
const picks = await Pick.findAll({ where: { gameId: req.params['gameId'] } })
|
||||
console.log(picks)
|
||||
res.send(picks)
|
||||
})
|
||||
|
||||
app.post('/api/character/:characterId/picks', async (req, res) => {
|
||||
const picks = await Pick.findAll({ where: { characterId: req.params['characterId'] } })
|
||||
console.log(picks)
|
||||
res.send(picks)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user