Remove APIMemberArray

This commit is contained in:
Rory&
2026-07-15 12:34:21 +02:00
parent 50fa6cc6d8
commit edcaa05be0
5 changed files with 4 additions and 3 deletions
Binary file not shown.
Binary file not shown.
@@ -42,7 +42,7 @@ router.get(
},
responses: {
200: {
body: "APIMemberArray",
body: "PublicMemberArray",
},
403: {
body: "APIErrorResponse",
@@ -65,7 +65,7 @@ router.get(
order: { id: "ASC" },
});
return res.json(members);
return res.json(members.map((m) => m.toPublicMember()));
},
);
+2
View File
@@ -115,3 +115,5 @@ export type PublicMember = Omit<Pick<Member, PublicMemberKeys>, "roles"> & {
user: PublicUser;
roles: string[]; // only role ids not objects
};
export type PublicMemberArray = PublicMember[];
-1
View File
@@ -45,7 +45,6 @@ export type APIWebhookArray = Webhook[];
export type APIDiscoveryCategoryArray = Categories[];
export type APIGeneralConfiguration = GeneralConfiguration;
export type APIChannelArray = Channel[];
export type APIMemberArray = Member[];
export interface APIGuildWithJoinedAt extends GuildCreateResponse {
joined_at: string;