Finished building blog overview page.
This commit is contained in:
1 parent
8ab9f09287
commit
83369773cd
15 files changed
+312
-40
No files matched your search
@@ -46,6 +46,12 @@ module.exports = class Articles extends DatabaseInterface {
|
||||
);
|
||||
}
|
||||
|
||||
async getArticlesPageCount(perPage) {
|
||||
if(!perPage) perPage = 10;
|
||||
let count = await this.getArticlesCount(perPage);
|
||||
return Math.ceil(count/perPage);
|
||||
}
|
||||
|
||||
async getArticlesByPage(page, perPage) {
|
||||
if(!page) page = 1;
|
||||
if(!perPage) perPage = 10;
|
||||
|
||||
Reference in new issue
Block a user