Ver código fonte

added lu fs files controller 404 test

tags/v0.5.3
Robin Thoni 7 anos atrás
pai
commit
d529ead25d

+ 5
- 0
Luticate2.Utils/Controllers/LuFsFilesCrudController.cs Ver arquivo

@@ -3,6 +3,7 @@ using System.IO;
3 3
 using Luticate2.Utils.Dbo.Basic;
4 4
 using Luticate2.Utils.Dbo.FsFiles;
5 5
 using Luticate2.Utils.Dbo.PaginatedRequest;
6
+using Luticate2.Utils.Dbo.Result;
6 7
 using Luticate2.Utils.Interfaces;
7 8
 using Luticate2.Utils.Utils;
8 9
 using Microsoft.AspNetCore.Http;
@@ -29,6 +30,10 @@ namespace Luticate2.Utils.Controllers
29 30
         public virtual IActionResult GetSingleByIdRaw([Required]string id, bool forceDownload = false)
30 31
         {
31 32
             var get = Business.GetSingleById(id);
33
+            if (get.Status == LuStatus.NotFound)
34
+            {
35
+                return StatusCode(404);
36
+            }
32 37
             if (!get)
33 38
             {
34 39
                 throw new LuResultException(get.To<object>());

Carregando…
Cancelar
Salvar