[Client] Fix bug
This commit is contained in:
parent
fbbb506e86
commit
7fe0d71e7f
|
@ -67,11 +67,11 @@ export default Vue.extend({
|
||||||
const process = async () => {
|
const process = async () => {
|
||||||
const user = await (this as any).os.api('users/show', parseAcct(this.verifyUsername));
|
const user = await (this as any).os.api('users/show', parseAcct(this.verifyUsername));
|
||||||
await (this as any).os.api('admin/verify-user', { userId: user.id });
|
await (this as any).os.api('admin/verify-user', { userId: user.id });
|
||||||
(this as any).os.apis.dialog({ text: '%i18n:@verified%' });
|
//(this as any).os.apis.dialog({ text: '%i18n:@verified%' });
|
||||||
};
|
};
|
||||||
|
|
||||||
await process().catch(e => {
|
await process().catch(e => {
|
||||||
(this as any).os.apis.dialog({ text: `Failed: ${e}` });
|
//(this as any).os.apis.dialog({ text: `Failed: ${e}` });
|
||||||
});
|
});
|
||||||
|
|
||||||
this.verifying = false;
|
this.verifying = false;
|
||||||
|
@ -83,11 +83,11 @@ export default Vue.extend({
|
||||||
const process = async () => {
|
const process = async () => {
|
||||||
const user = await (this as any).os.api('users/show', parseAcct(this.unverifyUsername));
|
const user = await (this as any).os.api('users/show', parseAcct(this.unverifyUsername));
|
||||||
await (this as any).os.api('admin/unverify-user', { userId: user.id });
|
await (this as any).os.api('admin/unverify-user', { userId: user.id });
|
||||||
(this as any).os.apis.dialog({ text: '%i18n:@unverified%' });
|
//(this as any).os.apis.dialog({ text: '%i18n:@unverified%' });
|
||||||
};
|
};
|
||||||
|
|
||||||
await process().catch(e => {
|
await process().catch(e => {
|
||||||
(this as any).os.apis.dialog({ text: `Failed: ${e}` });
|
//(this as any).os.apis.dialog({ text: `Failed: ${e}` });
|
||||||
});
|
});
|
||||||
|
|
||||||
this.unverifying = false;
|
this.unverifying = false;
|
||||||
|
@ -99,11 +99,11 @@ export default Vue.extend({
|
||||||
const process = async () => {
|
const process = async () => {
|
||||||
const user = await (this as any).os.api('users/show', parseAcct(this.suspendUsername));
|
const user = await (this as any).os.api('users/show', parseAcct(this.suspendUsername));
|
||||||
await (this as any).os.api('admin/suspend-user', { userId: user.id });
|
await (this as any).os.api('admin/suspend-user', { userId: user.id });
|
||||||
(this as any).os.apis.dialog({ text: '%i18n:@suspended%' });
|
//(this as any).os.apis.dialog({ text: '%i18n:@suspended%' });
|
||||||
};
|
};
|
||||||
|
|
||||||
await process().catch(e => {
|
await process().catch(e => {
|
||||||
(this as any).os.apis.dialog({ text: `Failed: ${e}` });
|
//(this as any).os.apis.dialog({ text: `Failed: ${e}` });
|
||||||
});
|
});
|
||||||
|
|
||||||
this.suspending = false;
|
this.suspending = false;
|
||||||
|
@ -115,11 +115,11 @@ export default Vue.extend({
|
||||||
const process = async () => {
|
const process = async () => {
|
||||||
const user = await (this as any).os.api('users/show', parseAcct(this.unsuspendUsername));
|
const user = await (this as any).os.api('users/show', parseAcct(this.unsuspendUsername));
|
||||||
await (this as any).os.api('admin/unsuspend-user', { userId: user.id });
|
await (this as any).os.api('admin/unsuspend-user', { userId: user.id });
|
||||||
(this as any).os.apis.dialog({ text: '%i18n:@unsuspended%' });
|
//(this as any).os.apis.dialog({ text: '%i18n:@unsuspended%' });
|
||||||
};
|
};
|
||||||
|
|
||||||
await process().catch(e => {
|
await process().catch(e => {
|
||||||
(this as any).os.apis.dialog({ text: `Failed: ${e}` });
|
//(this as any).os.apis.dialog({ text: `Failed: ${e}` });
|
||||||
});
|
});
|
||||||
|
|
||||||
this.unsuspending = false;
|
this.unsuspending = false;
|
||||||
|
|
Loading…
Reference in New Issue