...
|
...
|
@@ -149,14 +149,16 @@ class FileApi { |
|
|
/**
|
|
|
* 获取上传记录
|
|
|
*/
|
|
|
async getAllLogs() {
|
|
|
let fileModel = new FileModel();
|
|
|
let result = await fileModel.findAll();
|
|
|
let finalResult = _.sortBy(result, o => {
|
|
|
return -new Date(o.date);
|
|
|
});
|
|
|
async getAllLogs(params) {
|
|
|
let page = _.parseInt(params.page);
|
|
|
let limit = 10;
|
|
|
let skip = page > 0? limit * (page - 1) : 0;
|
|
|
|
|
|
let result = await new FileModel().cfind({}).sort({
|
|
|
date: -1
|
|
|
}).skip(skip).limit(limit).exec();
|
|
|
|
|
|
return finalResult;
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
}
|
...
|
...
|
|