mirror of
https://github.com/spacebarchat/server.git
synced 2026-07-25 21:12:06 +00:00
Remove APIMemberArray
This commit is contained in:
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()));
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -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[];
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user