You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
509 B
25 lines
509 B
'use strict';
|
|
const moment = require('moment')
|
|
const fs = require('fs');
|
|
|
|
async function get(ctx) {
|
|
try {
|
|
const { models } = ctx.fs.dc;
|
|
let resourceList = await models.Resource.findAndCountAll({
|
|
order: [['id']],
|
|
});
|
|
ctx.status = 200
|
|
ctx.body = resourceList;
|
|
} catch (error) {
|
|
ctx.fs.logger.error(`path:${ctx.path},error:${error}`)
|
|
ctx.status = 400;
|
|
ctx.body = { name: 'FindError', message: '权限列表' }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
get,
|
|
}
|