summaryrefslogtreecommitdiffstats
path: root/src/server/Api/V1/Entries/GetEntriesRoute.cs
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-02-14 19:02:54 +0100
committerivarlovlie <git@ivarlovlie.no>2022-02-14 19:02:54 +0100
commit1d482a4ec2cf24dbe7cc6cb02e192e1b9545f796 (patch)
tree9b0a26b7d3efeecd5ec20a6e5624857624bc53a6 /src/server/Api/V1/Entries/GetEntriesRoute.cs
parentda4c22abbbf04566891976d01f5cf629857f8d0b (diff)
downloadbookmark-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.cs5
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)));
}
}