You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
writeJSONError(w, http.StatusNotFound, fmt.Sprintf("Not Found: The short link key '%s' does not exist.", path))
486
+
return
487
+
}
488
+
484
489
iferr:=deleteURL(path); err!=nil {
485
490
writeJSONError(w, http.StatusInternalServerError, fmt.Sprintf("Internal Server Error: Failed to delete URL '%s' from the database (%v).", path, err))
486
491
return
@@ -687,7 +692,7 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
687
692
688
693
url, err:=getURL(rootRedirectKey)
689
694
iferr==nil {
690
-
r.URL.Path="/"
695
+
r.URL.Path="/"
691
696
handlePageView(r)
692
697
http.Redirect(w, r, url, http.StatusFound)
693
698
return
@@ -722,4 +727,4 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
722
727
default:
723
728
writeJSONError(w, http.StatusMethodNotAllowed, fmt.Sprintf("Method not allowed: Unsupported HTTP method '%s' for custom path endpoint. Use GET, PUT, or DELETE.", r.Method))
0 commit comments