first commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Fitness_core_BE.DTOs.Rbac;
|
||||
using Fitness_core_BE.Helpers;
|
||||
using Fitness_core_BE.Interfaces.Services;
|
||||
using Fitness_core_BE.Models.IOs;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using static Fitness_core_BE.Helpers.JwtMiddleware;
|
||||
using static Fitness_core_BE.Helpers.ApiResponseHelper;
|
||||
|
||||
namespace Fitness_core_BE.Controllers
|
||||
{
|
||||
// Returns the permission-filtered sidebar nav for the current caller — the owner sees
|
||||
// everything, staff see only what their assigned role permits.
|
||||
[ApiController]
|
||||
[Route("api/client")]
|
||||
public class NavController : ControllerBase
|
||||
{
|
||||
private readonly INavigationService _navigationService;
|
||||
|
||||
public NavController(INavigationService navigationService)
|
||||
{
|
||||
_navigationService = navigationService;
|
||||
}
|
||||
|
||||
[CustomMiddleware]
|
||||
[TenantResolution]
|
||||
[HttpGet("nav")]
|
||||
public async Task<ActionResult<ApiResponse<NavResponseDto>>> GetNav()
|
||||
{
|
||||
return Response(await _navigationService.GetNavigationAsync(HttpContext));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user