This commit is contained in:
mmrbnjd
2024-05-28 15:03:08 +03:30
parent 4e6f8a5c40
commit 325a2bad5e
15 changed files with 193 additions and 116 deletions

View File

@@ -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;