chore: Nuxt 4 upgrade (#7426)
This commit is contained in:
1 parent
70a251a331
commit
d3e41582ae
561 files changed
+1840
-2750
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { BaseCRUDAPI } from "../base/base-clients";
|
||||
import type { GroupBase, GroupInDB } from "~/lib/api/types/user";
|
||||
import type { GroupAdminUpdate } from "~/lib/api/types/group";
|
||||
|
||||
const prefix = "/api";
|
||||
|
||||
const routes = {
|
||||
adminUsers: `${prefix}/admin/groups`,
|
||||
adminUsersId: (id: string) => `${prefix}/admin/groups/${id}`,
|
||||
};
|
||||
|
||||
export class AdminGroupsApi extends BaseCRUDAPI<GroupBase, GroupInDB, GroupAdminUpdate> {
|
||||
baseRoute: string = routes.adminUsers;
|
||||
itemRoute = routes.adminUsersId;
|
||||
|
||||
async updateOne(id: string, payload: GroupAdminUpdate) {
|
||||
// TODO: This should probably be a patch request, which isn't offered by the API currently
|
||||
return await this.requests.put<GroupInDB, GroupAdminUpdate>(this.itemRoute(id), payload);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user