diff --git a/backend/src/app.ts b/backend/src/app.ts
index d348c86..93cde4d 100644
--- a/backend/src/app.ts
+++ b/backend/src/app.ts
@@ -96,7 +96,10 @@ app.post('/api/game', jsonParser, async (req, res) => {
})
app.get('/api/game/:gameId', async (req, res) => {
- res.send(await Game.findOne({ where: { id: req.params['gameId'] } }))
+
+ const game = await Game.findOne({ where: { id: req.params['gameId'] } })
+ console.log(game)
+ res.send(game)
})
app.listen(port, async () => {
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts
index d14a5e5..6233f42 100644
--- a/frontend/src/router/index.ts
+++ b/frontend/src/router/index.ts
@@ -1,18 +1,24 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import GameList from '../vues/GameList.vue'
+import GameDetails from '../vues/GameDetails.vue'
-const rootPath = {
+const root = {
path: '/',
- component: GameList
+ redirect: '/games'
}
const gameListRoute = {
- path: '/potato',
+ path: '/games',
component: GameList
}
-const routes = [rootPath, gameListRoute]
+const gameDetailsRoute = {
+ path: '/games/:gameId',
+ component: GameDetails
+}
+
+const routes = [root, gameListRoute, gameDetailsRoute]
export default createRouter({
history: createWebHashHistory(),
diff --git a/frontend/src/vues/GameDetails.vue b/frontend/src/vues/GameDetails.vue
new file mode 100644
index 0000000..734318f
--- /dev/null
+++ b/frontend/src/vues/GameDetails.vue
@@ -0,0 +1,33 @@
+
+