fix: Property 'rows' does not exist on type '{}'.
This commit is contained in:
parent
e980791796
commit
837865b880
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user