foods pagination
This commit is contained in:
@@ -25,6 +25,16 @@ export class ResponseInterceptor implements NestInterceptor {
|
||||
return data;
|
||||
}
|
||||
|
||||
// Check if this is a paginated result (has both data and meta properties)
|
||||
if (data && typeof data === 'object' && 'data' in data && 'meta' in data) {
|
||||
return {
|
||||
statusCode,
|
||||
success: true,
|
||||
data: data.data,
|
||||
meta: data.meta,
|
||||
};
|
||||
}
|
||||
|
||||
if (data && data.data !== undefined) {
|
||||
return {
|
||||
statusCode,
|
||||
|
||||
Reference in New Issue
Block a user