...
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Common.Dtos.Company;
|
||||
using Common.Dtos;
|
||||
using Common.Dtos.Company;
|
||||
using Hushian.Application.Constants;
|
||||
using Hushian.Application.Services;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
@@ -39,7 +40,15 @@ namespace Hushian.WebApi.Controllers.v1
|
||||
return response.Success && response.Value ? NoContent()
|
||||
: BadRequest(response.Errors);
|
||||
}
|
||||
|
||||
[HttpPut("ChangePasswordCompany")]
|
||||
[Authorize(Roles = "Company")]
|
||||
public async Task<ActionResult> ChangePasswordCompany([FromBody] ChangePasswordDto item)
|
||||
{
|
||||
var response = await _companyService.ChangePasswordCompany(item, Convert.ToInt32(User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First()));
|
||||
return response.Success && response.Value ? NoContent()
|
||||
: BadRequest(response.Errors);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user