updated to make index page working

This commit is contained in:
tmshv committed 2019-10-15 00:16:55 +03:00
1 parent 7363d7c0ec
commit 5831275b7a
11 files changed
+160 -149

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@ export async function findArticlesNin(nin, skip, limit, sort) {
})
}
export async function findArticles(page, pageSize) {
export async function findArticles(page: number, pageSize: number) {
const limit = pageSize
const skip = (page - 1) * pageSize
+1 -1
View File
@@ -5,7 +5,7 @@
* @param Class
* @param object
*/
exports.mapOf = function mapOf(Class, object) {
export function mapOf(Class, object) {
return Object
.entries(object)
.reduce((map, i) => (