Skip to content

Commit 1255b74

Browse files
fix: remove unused variable
1 parent 90b6218 commit 1255b74

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

cmd/api/errors.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ func (app *application) unauthorizedErrorResponse(w http.ResponseWriter, r *http
3333
writeJSONError(w, http.StatusUnauthorized, err.Error())
3434
}
3535

36-
func (app *application) forbiddenErrorResponse(w http.ResponseWriter, r *http.Request, err error) {
37-
app.logger.Warnf("forbidden error", "method", r.Method, "path", r.URL.Path, "error", err.Error())
38-
writeJSONError(w, http.StatusForbidden, err.Error())
39-
}
40-
4136
func (app *application) unauthorizedBasicErrorResponse(w http.ResponseWriter, r *http.Request, err error) {
4237
app.logger.Warnf("unauthorized basic error", "method", r.Method, "path", r.URL.Path, "error", err.Error())
4338

cmd/api/middleware.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,6 @@ func (app *application) IsOwnerMiddleware(next http.Handler) http.Handler {
178178
user := getUserFromContext(r)
179179
userID := user.ID
180180

181-
//TODO: delete later
182-
fmt.Printf("IsOwnerMiddleware running 🔐🔐🔐🔐🔐🔐 for venueID: %d and userID: %d ", venueID, userID)
183-
184181
// Check if the user is the owner of the venue
185182
isOwner, err := app.store.Venues.IsOwner(r.Context(), venueID, userID)
186183
if err != nil || !isOwner {

0 commit comments

Comments
 (0)