diff options
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) |