Merge pull request 'main' (#32) from main into feature-nxdev
Reviewed-on: #32
This commit is contained in:
@@ -28,6 +28,20 @@ namespace IM_API.Controllers
|
||||
var res = new BaseResponse<List<Conversation>>(list);
|
||||
return Ok(res);
|
||||
}
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> Clear()
|
||||
{
|
||||
var userIdStr = User.FindFirstValue(ClaimTypes.NameIdentifier);
|
||||
await _conversationSerivice.ClearConversationsAsync(int.Parse(userIdStr));
|
||||
return Ok(new BaseResponse<object?>());
|
||||
}
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> Delete(int cid)
|
||||
{
|
||||
await _conversationSerivice.DeleteConversationAsync(cid);
|
||||
return Ok(new BaseResponse<object?>());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace IM_API.Controllers
|
||||
{
|
||||
var userIdStr = User.FindFirstValue(ClaimTypes.NameIdentifier);
|
||||
int userId = int.Parse(userIdStr);
|
||||
await _userService.ResetPasswordAsync(userId,dto.oldPassword,dto.Password);
|
||||
await _userService.ResetPasswordAsync(userId,dto.OldPassword,dto.Password);
|
||||
return Ok(new BaseResponse<object?>());
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user