From fa669f9332982171f068bd66aeef0ed55e4e8ccf Mon Sep 17 00:00:00 2001 From: Eduardo Lopes <155753879+eduardolopesx03@users.noreply.github.com> Date: Mon, 2 Feb 2026 15:26:21 -0300 Subject: [PATCH] Require auth for Excel import --- Controllers/LinesController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Controllers/LinesController.cs b/Controllers/LinesController.cs index ed8ce63..d9269d1 100644 --- a/Controllers/LinesController.cs +++ b/Controllers/LinesController.cs @@ -3,6 +3,7 @@ using line_gestao_api.Data; using line_gestao_api.Dtos; using line_gestao_api.Models; using line_gestao_api.Services; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; @@ -503,6 +504,7 @@ namespace line_gestao_api.Controllers // ✅ 8. IMPORT EXCEL // ========================================================== [HttpPost("import-excel")] + [Authorize] [Consumes("multipart/form-data")] [RequestSizeLimit(50_000_000)] public async Task> ImportExcel([FromForm] ImportExcelForm form)