23 lines
No EOL
368 B
JavaScript
23 lines
No EOL
368 B
JavaScript
const knex = require('../db');
|
|
|
|
const findGameById = async (gameId) => {
|
|
return await knex('game')
|
|
.where({'id': gameId})
|
|
.select('*');
|
|
}
|
|
|
|
const findGameByRoom = async (roomId) => {
|
|
return await knex('game')
|
|
.where({'id': roomId})
|
|
.select('*');
|
|
}
|
|
|
|
const insertGame = async (game) => {
|
|
|
|
}
|
|
|
|
module.exports = {
|
|
findGameById,
|
|
findGameByRoom,
|
|
insertGame
|
|
} |