mirror of
https://github.com/aykhans/oh-my-url.git
synced 2025-12-15 18:09:20 +00:00
🔨 Refactor URL handling logic and remove unused variables
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package httpHandlers
|
||||
|
||||
import (
|
||||
"github.com/aykhans/oh-my-url/app/config"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
@@ -12,7 +13,7 @@ func (hl *HandlerForward) UrlForward(w http.ResponseWriter, r *http.Request) {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
} else if segments[1] == "" {
|
||||
http.Redirect(w, r, hl.CreateDomain, http.StatusMovedPermanently)
|
||||
http.Redirect(w, r, config.GetCreateDomain(), http.StatusMovedPermanently)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user