diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-02-14 19:02:54 +0100 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-02-14 19:02:54 +0100 |
| commit | 1d482a4ec2cf24dbe7cc6cb02e192e1b9545f796 (patch) | |
| tree | 9b0a26b7d3efeecd5ec20a6e5624857624bc53a6 /src/server/Api/V1/Entries/GetEntriesRoute.cs | |
| parent | da4c22abbbf04566891976d01f5cf629857f8d0b (diff) | |
| download | bookmark-thing-1d482a4ec2cf24dbe7cc6cb02e192e1b9545f796.tar.xz bookmark-thing-1d482a4ec2cf24dbe7cc6cb02e192e1b9545f796.zip | |
feat: Experiment with tailwind
Diffstat (limited to 'src/server/Api/V1/Entries/GetEntriesRoute.cs')
| -rw-r--r-- | src/server/Api/V1/Entries/GetEntriesRoute.cs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/server/Api/V1/Entries/GetEntriesRoute.cs b/src/server/Api/V1/Entries/GetEntriesRoute.cs index 27905a2..6b1d87e 100644 --- a/src/server/Api/V1/Entries/GetEntriesRoute.cs +++ b/src/server/Api/V1/Entries/GetEntriesRoute.cs @@ -14,12 +14,9 @@ public class GetEntriesRoute : RouteBaseV1Sync.WithoutRequest.WithActionResult<L /// Get all entries /// </summary> [ApiVersion(ApiSpecV1.VERSION_STRING)] + [BasicAuthentication(AppConstants.TOKEN_ALLOW_READ)] [HttpGet("~/v{version:apiVersion}/entries")] public override ActionResult<List<EntryDto>> Handle() { - if (IsApiCall() && !HasApiPermission(Constants.TOKEN_ALLOW_READ)) { - return StatusCode(403, "Your token does not permit access to this resource"); - } - return Ok(_context.Entries.Where(c => c.UserId == LoggedInUser.Id).Select(c => new EntryDto(c))); } } |
