From e4555cf7afa5e902411eb9ccb2e6773ffb2e6a9d Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 3 Sep 2024 11:10:25 +0200 Subject: [PATCH] feat(spot): added getStatus request to public key whitelist --- backend/pkg/spot/api/router.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/pkg/spot/api/router.go b/backend/pkg/spot/api/router.go index b28c8f54f..2c508f86d 100644 --- a/backend/pkg/spot/api/router.go +++ b/backend/pkg/spot/api/router.go @@ -147,7 +147,10 @@ func isSpotWithKeyRequest(r *http.Request) bool { } getSpotPrefix := "/v1/spots/{id}" // GET addCommentPrefix := "/v1/spots/{id}/comment" // POST - if (pathTemplate == getSpotPrefix && r.Method == "GET") || (pathTemplate == addCommentPrefix && r.Method == "POST") { + getStatusPrefix := "/v1/spots/{id}/status" // GET + if (pathTemplate == getSpotPrefix && r.Method == "GET") || + (pathTemplate == addCommentPrefix && r.Method == "POST") || + (pathTemplate == getStatusPrefix && r.Method == "GET") { return true } return false