mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: 添加加域成功提示 (#87)
This commit is contained in:
1 parent
5bbce72a68
commit
acf533cdba
6 files changed
+19
-4
No files matched your search
@@ -256,6 +256,11 @@ class DomainJoinApplicationsHandler extends ManageHandler {
|
||||
class DomainJoinHandler extends Handler {
|
||||
joinSettings: any;
|
||||
|
||||
constructor(ctx) {
|
||||
super(ctx);
|
||||
this.noCheckPermView = true;
|
||||
}
|
||||
|
||||
async prepare() {
|
||||
const r = await domain.getRoles(this.domain);
|
||||
const roles = r.map((role) => role._id);
|
||||
@@ -283,7 +288,7 @@ class DomainJoinHandler extends Handler {
|
||||
}
|
||||
}
|
||||
await domain.setUserRole(this.domain._id, this.user._id, this.joinSettings.role);
|
||||
this.response.redirect = this.url('domain_main');
|
||||
this.response.redirect = this.url('domain_main', { query: { notification: 'Successfully joined domain.' } });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import superagent from 'superagent';
|
||||
import { PassThrough } from 'stream';
|
||||
import { PermissionError, InvalidTokenError, RemoteOnlineJudgeError } from '../error';
|
||||
import { Logger } from '../logger';
|
||||
import { logAndReturn } from '../utils';
|
||||
import { ProblemAdd } from '../lib/ui';
|
||||
import { PERM } from '../model/builtin';
|
||||
import token from '../model/token';
|
||||
@@ -12,7 +13,6 @@ import {
|
||||
Handler, Types, Route, post,
|
||||
} from '../service/server';
|
||||
import storage from '../service/storage';
|
||||
import { logAndReturn } from '../utils';
|
||||
|
||||
const logger = new Logger('remote');
|
||||
|
||||
|
||||
Reference in new issue
Block a user