mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-12 00:13:10 +02:00
wip
This commit is contained in:
parent
fb1e2efbdd
commit
ba08d1aa53
1 changed files with 20 additions and 20 deletions
|
@ -11,29 +11,29 @@ import Vue from "vue";
|
||||||
import parseAcct from "../../../../../../misc/acct/parse";
|
import parseAcct from "../../../../../../misc/acct/parse";
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
username: null,
|
username: null,
|
||||||
suspending: false
|
suspending: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async suspendUser() {
|
async suspendUser() {
|
||||||
this.suspending = true;
|
this.suspending = true;
|
||||||
|
|
||||||
const user = await (this as any).os.api(
|
const user = await (this as any).os.api(
|
||||||
"users/show",
|
"users/show",
|
||||||
parseAcct(this.username)
|
parseAcct(this.username)
|
||||||
);
|
);
|
||||||
|
|
||||||
await (this as any).os.api("admin/suspend-user", {
|
await (this as any).os.api("admin/suspend-user", {
|
||||||
userId: user.id
|
userId: user.id
|
||||||
});
|
});
|
||||||
|
|
||||||
this.suspending = false;
|
this.suspending = false;
|
||||||
|
|
||||||
(this as any).os.apis.dialog("%i18n:@suspended%");
|
(this as any).os.apis.dialog({ text: "%i18n:@suspended%" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue