:drunk: Write shit code trying to split up the Auth (WIP)

This commit is contained in:
2025-07-06 12:58:18 +08:00
parent 5757526ea5
commit 6a3d04af3d
224 changed files with 1889 additions and 36885 deletions

View File

@ -1,3 +1,4 @@
using DysonNetwork.Common.Models;
using DysonNetwork.Sphere.Chat;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@ -13,7 +14,7 @@ public class RealmChatController(AppDatabase db, RealmService rs) : ControllerBa
[Authorize]
public async Task<ActionResult<List<ChatRoom>>> ListRealmChat(string slug)
{
var currentUser = HttpContext.Items["CurrentUser"] as Account.Account;
var currentUser = await passClient.GetAccountByIdAsync(User.GetUserId());
var realm = await db.Realms
.Where(r => r.Slug == slug)