This commit is contained in:
mmrbnjd
2025-07-26 11:47:32 +03:30
parent 29107ce9c6
commit c045ace959
10 changed files with 88 additions and 64 deletions

View File

@@ -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);
}
}
}