添加查询和创建角色功能;建立长连接后返回部分初始数据
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user