diff options
author | Michael Hunteman <michael@huntm.net> | 2024-09-28 10:55:35 -0700 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2024-09-28 11:25:16 -0700 |
commit | 0154a152dd6d3606c9131f3186a9175ee5853185 (patch) | |
tree | a166f0cf3819607592fb5ee03255108563f4ba68 /server/guest | |
parent | 99b5a49b5fcccb7c6523a95c67e39830bc2a2a45 (diff) |
Use api endpoint for backend
Diffstat (limited to 'server/guest')
-rw-r--r-- | server/guest/handler.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/guest/handler.go b/server/guest/handler.go index 008aeef..20ed2dc 100644 --- a/server/guest/handler.go +++ b/server/guest/handler.go @@ -13,8 +13,8 @@ import ( ) var ( - guestRegex = regexp.MustCompile(`^/guests/*$`) - guestIDRegex = regexp.MustCompile(`^/guests/([0-9]+)$`) + guestRegex = regexp.MustCompile(`^/api/guests/*$`) + guestIDRegex = regexp.MustCompile(`^/api/guests/([0-9]+)$`) ) type GuestHandler struct { @@ -46,7 +46,7 @@ func (handler *GuestHandler) ServeHTTP(responseWriter http.ResponseWriter, switch { case request.Method == http.MethodOptions: responseWriter.WriteHeader(http.StatusOK) - case request.Method == http.MethodPost && request.URL.Path == "/guests/login": + case request.Method == http.MethodPost && request.URL.Path == "/api/guests/login": handler.handleLogIn(responseWriter, request) case request.Method == http.MethodPut && guestIDRegex.MatchString(request.URL.Path): handler.handlePut(responseWriter, request) |