💥 Switch all id to uuid

This commit is contained in:
2025-05-14 20:03:47 +08:00
parent aeeed24290
commit 9576870373
53 changed files with 765 additions and 24171 deletions

View File

@ -32,9 +32,9 @@ public class RealtimeCallController(IConfiguration configuration, AppDatabase db
public string Token { get; set; } = null!;
}
[HttpGet("{roomId:long}")]
[HttpGet("{roomId:guid}")]
[Authorize]
public async Task<ActionResult<RealtimeChatToken>> GetToken(long roomId)
public async Task<ActionResult<RealtimeChatToken>> GetToken(Guid roomId)
{
if (HttpContext.Items["CurrentUser"] is not Account.Account currentUser) return Unauthorized();
@ -60,9 +60,9 @@ public class RealtimeCallController(IConfiguration configuration, AppDatabase db
});
}
[HttpPost("{roomId:long}")]
[HttpPost("{roomId:guid}")]
[Authorize]
public async Task<IActionResult> StartCall(long roomId)
public async Task<IActionResult> StartCall(Guid roomId)
{
if (HttpContext.Items["CurrentUser"] is not Account.Account currentUser) return Unauthorized();
@ -79,9 +79,9 @@ public class RealtimeCallController(IConfiguration configuration, AppDatabase db
return Ok(call);
}
[HttpDelete("{roomId:long}")]
[HttpDelete("{roomId:guid}")]
[Authorize]
public async Task<IActionResult> EndCall(long roomId)
public async Task<IActionResult> EndCall(Guid roomId)
{
if (HttpContext.Items["CurrentUser"] is not Account.Account currentUser) return Unauthorized();