mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-07-12 16:03:27 +08:00
feat(auth): implement cookie-based token management and update user ID retrieval
This commit is contained in:
@@ -273,7 +273,7 @@ public class PictureController(IPictureService pictureService, IStorageService s
|
||||
_logger.LogWarning("GetPictureFile: Picture with ID {PictureId} not found.", pictureId);
|
||||
return NotFound("Picture not found.");
|
||||
}
|
||||
var currentUserId = GetCurrentUserId();
|
||||
var currentUserId = GetUserIdFromCookie();
|
||||
if (picture.Permission != PermissionType.Public)
|
||||
{
|
||||
if (currentUserId == null || picture.UserId != currentUserId.Value)
|
||||
|
||||
Reference in New Issue
Block a user