|
|
@@ -49,6 +49,7 @@ |
|
|
|
{ |
|
|
|
{ClaimConst.CLAINM_USERID, User.Id}, |
|
|
|
{ClaimConst.CLAINM_NAME,User.Name}, |
|
|
|
{ClaimConst.CLAINM_ACCOUNT,Info.Account }, |
|
|
|
{ClaimConst.CLAINM_ISAUTH,User.IsAdmin}, |
|
|
|
{ClaimConst.CLAINM_ROLEID,User.RoleId } |
|
|
|
}, 43200); |
|
|
@@ -307,7 +308,8 @@ |
|
|
|
[HttpPost] |
|
|
|
public async Task<bool> EditAccountPwd(AccountUpdatePwdInput input) |
|
|
|
{ |
|
|
|
var model = db.Queryable<AccountEntity>().First(t => t.Account == input.Account && t.Pwd == input.Pwd); |
|
|
|
var Account = App.User?.FindFirst(ClaimConst.CLAINM_ACCOUNT)?.Value; |
|
|
|
var model = db.Queryable<AccountEntity>().First(t => t.Account == Account && t.Pwd == input.OldPwd); |
|
|
|
if (model == null) throw Oops.Bah("原密码不正确"); |
|
|
|
model.Pwd = input.NewPwd; |
|
|
|
return await db.Updateable(model).ExecuteCommandAsync() > 0; |
|
|
|