feat: order the object metadata items of the API alphabetically (#12558)
resolve #12549 This PR updates the `findManyWithinWorkspace` function to order the object metadata items alphabetically by `namePlural` in ascending order. https://github.com/user-attachments/assets/0be77a37-173f-4cf2-86eb-8f2420d8ff51
This commit is contained in:
@ -62,7 +62,11 @@ export class OpenApiService {
|
||||
await this.accessTokenService.validateTokenByRequest(request);
|
||||
|
||||
objectMetadataItems =
|
||||
await this.objectMetadataService.findManyWithinWorkspace(workspace.id);
|
||||
await this.objectMetadataService.findManyWithinWorkspace(workspace.id, {
|
||||
order: {
|
||||
namePlural: 'ASC',
|
||||
},
|
||||
});
|
||||
} catch (err) {
|
||||
return schema;
|
||||
}
|
||||
|
||||
@ -430,6 +430,9 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
|
||||
...options?.where,
|
||||
workspaceId,
|
||||
},
|
||||
order: {
|
||||
...options?.order,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user