🐛 Fix translate controller shows unexpected unauthorized

This commit is contained in:
2025-07-31 20:16:13 +08:00
parent 92a8709df0
commit d7dcb7221f
2 changed files with 2 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ public class ChatRoomController(
[Authorize]
public async Task<ActionResult<ChatRoom>> CreateDirectMessage([FromBody] DirectMessageRequest request)
{
if (HttpContext.Items["CurrentUser"] is not Shared.Proto.Account currentUser)
if (HttpContext.Items["CurrentUser"] is not Account currentUser)
return Unauthorized();
var relatedUser = await accounts.GetAccountAsync(

View File

@@ -1,7 +1,7 @@
using DysonNetwork.Pass.Account;
using System.Security.Cryptography;
using System.Text;
using DysonNetwork.Shared.Cache;
using DysonNetwork.Shared.Proto;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;