using MediaManager.database;
using MediaManager.database.Tables;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace MediaManager.Pages;

public class IndexModel : PageModel {
	public User AuthorizedUser;

	public void OnGet() {
		using var db = new Database.DbConn();
		AuthorizedUser = db.Users.FirstOrDefault(p => p.Username == AuthUtil.GetRemoteUser(HttpContext, db))!;
	}
}
