Fix return type in roles service

This commit is contained in:
rijkvanzanten
2021-07-28 12:04:55 -04:00
parent ed0029178f
commit 2e442b2757

View File

@@ -66,7 +66,7 @@ export class RolesService extends ItemsService {
return;
}
async updateOne(key: PrimaryKey, data: Record<string, any>, opts?: MutationOptions) {
async updateOne(key: PrimaryKey, data: Record<string, any>, opts?: MutationOptions): Promise<PrimaryKey> {
if ('admin_access' in data && data.admin_access === false) {
await this.checkForOtherAdminRoles([key]);
}
@@ -78,7 +78,7 @@ export class RolesService extends ItemsService {
return super.updateOne(key, data, opts);
}
async updateMany(keys: PrimaryKey[], data: Record<string, any>, opts?: MutationOptions) {
async updateMany(keys: PrimaryKey[], data: Record<string, any>, opts?: MutationOptions): Promise<PrimaryKey[]> {
if ('admin_access' in data && data.admin_access === false) {
await this.checkForOtherAdminRoles(keys);
}