fix: Property 'rows' does not exist on type '{}'.

This commit is contained in:
chenos 2021-02-22 11:11:49 +08:00
parent e980791796
commit 837865b880
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ import { Action } from '@nocobase/resourcer';
export async function middleware(ctx: Context, next: Next) {
await next();
if (ctx.action instanceof Action) {
const { rows, ...meta } = ctx.body;
const { rows, ...meta } = ctx.body as any;
if (rows) {
ctx.body = {
data: rows,

View File

@ -4,7 +4,7 @@ import { Action } from '@nocobase/resourcer';
export async function jsonResponse(ctx: Context, next: Next) {
await next();
if (ctx.action instanceof Action) {
const { rows, ...meta } = ctx.body;
const { rows, ...meta } = ctx.body as any;
if (rows) {
ctx.body = {
data: rows,