Skip to content

Commit

Permalink
chore(cms)!: unnest getSchemas return fields from 'results'
Browse files Browse the repository at this point in the history
BREAKING CHANGE: getSchemas now directly returns 'schemas' and 'documentsCount'
  • Loading branch information
kon14 committed Dec 21, 2021
1 parent a14c79c commit 9001254
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions modules/cms/src/admin/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,8 @@ export class AdminHandlers {
},
},
new ConduitRouteReturnDefinition('GetSchemas', {
results: { // TODO: unnest (frontend compat)
schemas: [_DeclaredSchema.getInstance().fields],
documentsCount: ConduitNumber.Required,
}
schemas: [_DeclaredSchema.getInstance().fields],
documentsCount: ConduitNumber.Required,
}),
'getSchemas'
),
Expand Down
2 changes: 1 addition & 1 deletion modules/cms/src/admin/schema.admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class SchemaAdmin {
throw new GrpcError(status.INTERNAL, e.message);
});

return { results: { schemas, documentsCount } }; // TODO: unnest (frontend compat)
return { schemas, documentsCount };
}

async getSchemasFromOtherModules(
Expand Down

0 comments on commit 9001254

Please sign in to comment.