fix: enforce booking admin auth and clean membership TODO
Co-authored-by: Velik <hongochai10@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,7 @@ using BookingService.API.Application.DTOs;
|
||||
using BookingService.API.Application.Queries;
|
||||
using BookingService.API.Models.Responses;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace BookingService.API.Controllers.Admin;
|
||||
@@ -14,7 +15,7 @@ namespace BookingService.API.Controllers.Admin;
|
||||
[ApiVersion("1.0")]
|
||||
[Route("api/v{version:apiVersion}/admin/appointments")]
|
||||
[Produces("application/json")]
|
||||
// [Authorize(Roles = "Admin,ShopOwner")] // TODO: Add authorization
|
||||
[Authorize(Roles = "Admin,ShopOwner")]
|
||||
public class AdminAppointmentsController : ControllerBase
|
||||
{
|
||||
private readonly IMediator _mediator;
|
||||
|
||||
@@ -6,6 +6,7 @@ using BookingService.API.Application.DTOs;
|
||||
using BookingService.API.Application.Queries;
|
||||
using BookingService.API.Models.Responses;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace BookingService.API.Controllers.Admin;
|
||||
@@ -14,7 +15,7 @@ namespace BookingService.API.Controllers.Admin;
|
||||
[ApiVersion("1.0")]
|
||||
[Route("api/v{version:apiVersion}/admin/resources")]
|
||||
[Produces("application/json")]
|
||||
// [Authorize(Roles = "Admin,ShopOwner")] // TODO: Add authorization
|
||||
[Authorize(Roles = "Admin,ShopOwner")]
|
||||
public class AdminResourcesController : ControllerBase
|
||||
{
|
||||
private readonly IMediator _mediator;
|
||||
|
||||
@@ -144,11 +144,6 @@ public class MembersController : ControllerBase
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Add experience and level endpoints in Phase 4
|
||||
// POST /api/v1/members/{id}/experience - Add EXP
|
||||
// GET /api/v1/members/{id}/progress - Get level progress
|
||||
// GET /api/v1/members/{id}/experience - Get EXP history
|
||||
|
||||
/// <summary>
|
||||
/// EN: Add experience points to a member.
|
||||
/// VI: Thêm điểm kinh nghiệm cho member.
|
||||
|
||||
Reference in New Issue
Block a user