Foxnouns.NET/Foxnouns.Backend/Controllers/ApiControllerBase.cs

13 lines
349 B
C#

using Foxnouns.Backend.Database.Models;
using Foxnouns.Backend.Middleware;
using Microsoft.AspNetCore.Mvc;
namespace Foxnouns.Backend.Controllers;
[ApiController]
[Authenticate]
public class ApiControllerBase : ControllerBase
{
internal Token? CurrentToken => HttpContext.GetToken();
internal User? CurrentUser => HttpContext.GetUser();
}