remove potentially sensitive fields from group self

This commit is contained in:
Michael Genson 2024-03-15 19:50:39 +00:00
parent b6ccb9fbdb
commit 52c6fe34b2
5 changed files with 29 additions and 7 deletions

View file

@ -1,5 +1,5 @@
import { BaseCRUDAPI } from "../base/base-clients";
import { CategoryBase, GroupBase, GroupInDB, UserOut } from "~/lib/api/types/user";
import { CategoryBase, GroupBase, GroupInDB, GroupSummary, UserOut } from "~/lib/api/types/user";
import {
CreateInviteToken,
GroupAdminUpdate,
@ -35,7 +35,7 @@ export class GroupAPI extends BaseCRUDAPI<GroupBase, GroupInDB, GroupAdminUpdate
/** Returns the Group Data for the Current User
*/
async getCurrentUserGroup() {
return await this.requests.get<GroupInDB>(routes.groupsSelf);
return await this.requests.get<GroupSummary>(routes.groupsSelf);
}
async getCategories() {