Merge pull request 'main' (#32) from main into feature-nxdev

Reviewed-on: #32
This commit is contained in:
2025-12-29 21:57:33 +08:00
committed by nanxun
16 changed files with 780 additions and 268 deletions
@@ -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?>());
}
}
}
+1 -1
View File
@@ -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>