Setup server to handle article page (untested)

This commit is contained in:
2018-11-26 21:48:03 +11:00
parent 829a152a1e
commit 66336a469f
14 changed files with 241 additions and 22 deletions

View File

@ -36,13 +36,13 @@ module.exports = class Articles extends DatabaseInterface {
async getArticleById(id) {
return await this.store.getFromDatabase(
`getArticleById_${id}`, `getArticleById`, {id}, 'one'
`getArticleById_${id}`, `getArticleById`, {id}, 'oneOrNone'
);
}
async getArticleByHandle(handle) {
return await this.store.getFromDatabase(
`getArticleByHandle_${handle}`, `getArticleByHandle`, {handle}, 'one'
`getArticleByHandle_${handle}`, `getArticleByHandle`, {handle}, 'oneOrNone'
);
}