fix: Property 'rows' does not exist on type 'unknown'.

This commit is contained in:
chenos 2021-03-16 16:58:57 +08:00
parent fdc1ab03e7
commit 17ae461163
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ export type Next = () => Promise<any>;
export interface Context extends Koa.Context {
db: Database;
action: Action;
body: any;
};
export { default as common } from './common';

View File

@ -10,7 +10,7 @@ export async function list(ctx: actions.Context, next: actions.Next) {
});
await actions.common.list(ctx, async () => {
const permissions = await associated.getPermissions();
(ctx.body.rows as any).forEach(item => {
ctx.body.rows.forEach(item => {
const permission = permissions.find(p => p.collection_name === item.get('name'));
if (permission) {
// item.permissions = [permission]; // 不输出