Browse Source

added lu fs files controller 404 test

tags/v0.5.3
Robin Thoni 7 years ago
parent
commit
d529ead25d
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      Luticate2.Utils/Controllers/LuFsFilesCrudController.cs

+ 5
- 0
Luticate2.Utils/Controllers/LuFsFilesCrudController.cs View File

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

Loading…
Cancel
Save