fix: missing return statement for removeGroup(s) API SDK method

This commit is contained in:
Jeeiii
2024-04-09 18:55:35 +02:00
parent 24ec186c05
commit 79498512e9
2 changed files with 18 additions and 7 deletions

View File

@@ -120,14 +120,20 @@ export class GroupsController {
if (apiKey) {
await this.groupsService.removeGroupsWithAPIKey(groupIds, apiKey)
} else if (req.session.adminId) {
return
}
if (req.session.adminId) {
await this.groupsService.removeGroupsManually(
groupIds,
req.session.adminId
)
} else {
throw new NotImplementedException()
return
}
throw new NotImplementedException()
}
@Delete(":group")
@@ -145,14 +151,19 @@ export class GroupsController {
if (apiKey) {
await this.groupsService.removeGroupWithAPIKey(groupId, apiKey)
} else if (req.session.adminId) {
return
}
if (req.session.adminId) {
await this.groupsService.removeGroupManually(
groupId,
req.session.adminId
)
} else {
throw new NotImplementedException()
return
}
throw new NotImplementedException()
}
@Patch()

View File

@@ -133,7 +133,7 @@ export async function updateGroups(
apiKey: string
): Promise<Array<Group>> {
const newConfig: any = {
method: "put",
method: "patch",
data: {
groupIds,
groupsInfo: groupsUpdateDetails