修正登陆接口字段名错误的bug
This commit is contained in:
parent
1f4663ecb5
commit
ae8a448159
@ -8,7 +8,7 @@ import { UserReward } from '../../models/UserReward'
|
||||
class GameUserController extends BaseController {
|
||||
// TODO:: 增加返回未使用的券
|
||||
@role('anon')
|
||||
@router('post /api/:accountid/login')
|
||||
@router('post /api/:accountId/login')
|
||||
@router('post /weapp/login')
|
||||
async gameUserLogin(req, res) {
|
||||
const {accountId} = req.params
|
||||
@ -18,7 +18,7 @@ class GameUserController extends BaseController {
|
||||
let user = (await GameUser.findOrCreate({accountId})).doc
|
||||
user.updateFromReq(req.params)
|
||||
await user.save()
|
||||
const token = await res.jwtSign({ id: user.id, accountId: accountId });
|
||||
const token = await res.jwtSign({ id: user.id, accountId });
|
||||
return {token}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user