mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
+translation +argType.Range
This commit is contained in:
1 parent
3cb4d2ad49
commit
b472b5c245
19 files changed
+100
-44
No files matched your search
@@ -207,7 +207,7 @@ class DomainJoinApplicationsHandler extends ManageHandler {
|
||||
this.response.template = 'domain_join_applications.html';
|
||||
}
|
||||
|
||||
@param('method', Types.UnsignedInt)
|
||||
@param('method', Types.Range(domain.JOIN_METHOD_RANGE))
|
||||
@param('role', Types.String, true)
|
||||
@param('expire', Types.UnsignedInt, true)
|
||||
@param('invitationCode', Types.String, true)
|
||||
@@ -215,7 +215,6 @@ class DomainJoinApplicationsHandler extends ManageHandler {
|
||||
const r = await domain.getRoles(this.domain);
|
||||
const roles = r.map((rl) => rl._id);
|
||||
const current = domain.getJoinSettings(this.domain, roles);
|
||||
if (!domain.JOIN_METHOD_RANGE[method]) throw new ValidationError('method');
|
||||
let joinSettings;
|
||||
if (method === domain.JOIN_METHOD_NONE) joinSettings = null;
|
||||
else {
|
||||
@@ -245,7 +244,6 @@ class DomainJoinHandler extends Handler {
|
||||
if (this.user.role !== 'default') throw new DomainJoinAlreadyMemberError(this.domain._id, this.user._id);
|
||||
}
|
||||
|
||||
// @base.require_priv(builtin.PRIV_USER_PROFILE)
|
||||
@param('code', Types.String, true)
|
||||
async get(domainId: string, code: string) {
|
||||
this.response.template = 'domain_join.html';
|
||||
|
||||
Reference in new issue
Block a user