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) {
 | 
					export async function middleware(ctx: Context, next: Next) {
 | 
				
			||||||
  await next();
 | 
					  await next();
 | 
				
			||||||
  if (ctx.action instanceof Action) {
 | 
					  if (ctx.action instanceof Action) {
 | 
				
			||||||
    const { rows, ...meta } = ctx.body;
 | 
					    const { rows, ...meta } = ctx.body as any;
 | 
				
			||||||
    if (rows) {
 | 
					    if (rows) {
 | 
				
			||||||
      ctx.body = {
 | 
					      ctx.body = {
 | 
				
			||||||
        data: rows,
 | 
					        data: rows,
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import { Action } from '@nocobase/resourcer';
 | 
				
			|||||||
export async function jsonResponse(ctx: Context, next: Next) {
 | 
					export async function jsonResponse(ctx: Context, next: Next) {
 | 
				
			||||||
  await next();
 | 
					  await next();
 | 
				
			||||||
  if (ctx.action instanceof Action) {
 | 
					  if (ctx.action instanceof Action) {
 | 
				
			||||||
    const { rows, ...meta } = ctx.body;
 | 
					    const { rows, ...meta } = ctx.body as any;
 | 
				
			||||||
    if (rows) {
 | 
					    if (rows) {
 | 
				
			||||||
      ctx.body = {
 | 
					      ctx.body = {
 | 
				
			||||||
        data: rows,
 | 
					        data: rows,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user