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) => {
|
app.get('/api/game/:gameId', async (req, res) => {
|
||||||
const game = await Game.findOne({ where: { id: req.params['gameId'] } })
|
const game = await Game.findOne({ where: { id: req.params['gameId'] } })
|
||||||
console.log(game)
|
|
||||||
res.send(game)
|
res.send(game)
|
||||||
})
|
})
|
||||||
|
|
||||||
app.post('/api/game/:gameId/apps', async (req, res) => {
|
app.post('/api/game/:gameId/apps', async (req, res) => {
|
||||||
const apps = await App.findAll({ where: { gameId: req.params['gameId'] } })
|
const apps = await App.findAll({ where: { gameId: req.params['gameId'] } })
|
||||||
console.log(apps)
|
|
||||||
res.send(apps)
|
res.send(apps)
|
||||||
})
|
})
|
||||||
|
|
||||||
app.post('/api/character/:characterId/apps', async (req, res) => {
|
app.post('/api/character/:characterId/apps', async (req, res) => {
|
||||||
const apps = await App.findAll({ where: { characterId: req.params['characterId'] } })
|
const apps = await App.findAll({ where: { characterId: req.params['characterId'] } })
|
||||||
console.log(apps)
|
|
||||||
res.send(apps)
|
res.send(apps)
|
||||||
})
|
})
|
||||||
|
|
||||||
app.post('/api/game/:gameId/picks', async (req, res) => {
|
app.post('/api/game/:gameId/picks', async (req, res) => {
|
||||||
const picks = await Pick.findAll({ where: { gameId: req.params['gameId'] } })
|
const picks = await Pick.findAll({ where: { gameId: req.params['gameId'] } })
|
||||||
console.log(picks)
|
|
||||||
res.send(picks)
|
res.send(picks)
|
||||||
})
|
})
|
||||||
|
|
||||||
app.post('/api/character/:characterId/picks', async (req, res) => {
|
app.post('/api/character/:characterId/picks', async (req, res) => {
|
||||||
const picks = await Pick.findAll({ where: { characterId: req.params['characterId'] } })
|
const picks = await Pick.findAll({ where: { characterId: req.params['characterId'] } })
|
||||||
console.log(picks)
|
|
||||||
res.send(picks)
|
res.send(picks)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
|
|
||||||
<div>Picks</div>
|
<div>Picks</div>
|
||||||
<div v-for="pick in picks">
|
<div v-for="pick in picks">
|
||||||
{{pick.characterId}} - {{pick.characterName}}
|
{{pick.characterName}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>Apps</div>
|
<div>Apps</div>
|
||||||
<div v-for="app in apps">
|
<div v-for="app in apps">
|
||||||
{{app.characterId}} - {{app.characterName}}
|
{{app.characterName}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user