添加查询和创建角色功能;建立长连接后返回部分初始数据

This commit is contained in:
liangtongchuan
2020-09-01 22:15:31 +08:00
parent 2617efa6ad
commit dbdb11692c
23 changed files with 466 additions and 145 deletions
+12
View File
@@ -12,4 +12,16 @@ export default class AccountController extends Controller {
const { tel, code, platform, pkgName, serverType } = ctx.request.body;
ctx.body = await ctx.service.auth.smsLogin(tel, code, platform, pkgName, serverType);
}
public async checkRole() {
const { ctx } = this;
const { serverId } = ctx.request.body;
ctx.body = await ctx.service.auth.checkRole(serverId);
}
public async createRole() {
const { ctx } = this;
const { serverId, roleName } = ctx.request.body;
ctx.body = await ctx.service.auth.createRole(serverId, roleName);
}
}