13 lines
213 B
JavaScript
13 lines
213 B
JavaScript
|
const knex = require('../db');
|
||
|
|
||
|
// TODO timestamps
|
||
|
|
||
|
const findMessageByRoom = async (roomId) => {
|
||
|
return await knex('message')
|
||
|
.where({'id': roomId})
|
||
|
.select('*');
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
findMessageByRoom
|
||
|
}
|