fix: Remove try/catch statements without error argument (#6370)
This commit is contained in:
@@ -93,7 +93,7 @@ export default class UsersStore extends Store<User> {
|
||||
try {
|
||||
this.updateCounts(UserRole.Admin, user.role);
|
||||
await this.actionOnUser("promote", user);
|
||||
} catch {
|
||||
} catch (_e) {
|
||||
this.updateCounts(user.role, UserRole.Admin);
|
||||
}
|
||||
};
|
||||
@@ -103,7 +103,7 @@ export default class UsersStore extends Store<User> {
|
||||
try {
|
||||
this.updateCounts(to, user.role);
|
||||
await this.actionOnUser("demote", user, to);
|
||||
} catch {
|
||||
} catch (_e) {
|
||||
this.updateCounts(user.role, to);
|
||||
}
|
||||
};
|
||||
@@ -114,7 +114,7 @@ export default class UsersStore extends Store<User> {
|
||||
this.counts.suspended += 1;
|
||||
this.counts.active -= 1;
|
||||
await this.actionOnUser("suspend", user);
|
||||
} catch {
|
||||
} catch (_e) {
|
||||
this.counts.suspended -= 1;
|
||||
this.counts.active += 1;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ export default class UsersStore extends Store<User> {
|
||||
this.counts.suspended -= 1;
|
||||
this.counts.active += 1;
|
||||
await this.actionOnUser("activate", user);
|
||||
} catch {
|
||||
} catch (_e) {
|
||||
this.counts.suspended += 1;
|
||||
this.counts.active -= 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user