foods pagination

This commit is contained in:
2025-12-21 09:43:16 +03:30
parent d80199fc65
commit 37f7b11dbc
4 changed files with 39 additions and 92 deletions
@@ -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,