...
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using Back.Data.Models;
|
||||
using Back.Services;
|
||||
using Back.Validations;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Shared.DTOs;
|
||||
@@ -10,6 +11,7 @@ using Shared.DTOs.Serch;
|
||||
namespace Back.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
public class InvoiceController : ControllerBase
|
||||
{
|
||||
@@ -36,7 +38,7 @@ namespace Back.Controllers
|
||||
|
||||
}
|
||||
[HttpGet("Get/{ID}")]
|
||||
public async Task<ActionResult<PagingDto<InvoiceGridDTO>?>> GetAll(int ID)
|
||||
public async Task<ActionResult<InvoiceGridDTO>?> GetAll(int ID)
|
||||
{
|
||||
var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
|
||||
var UserID = claim.Value;
|
||||
|
Reference in New Issue
Block a user