mirror of
https://github.com/aykhans/oh-my-url.git
synced 2025-04-19 03:09:42 +00:00
26 lines
497 B
Go
26 lines
497 B
Go
package httpHandlers
|
|
|
|
import (
|
|
"github.com/aykhans/oh-my-url/app/db"
|
|
"github.com/aykhans/oh-my-url/app/utils"
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
type HandlerCreate struct {
|
|
DB db.DB
|
|
}
|
|
|
|
type HandlerForward struct {
|
|
DB db.DB
|
|
}
|
|
|
|
func FaviconHandler(w http.ResponseWriter, r *http.Request) {
|
|
http.ServeFile(w, r, utils.GetTemplatePaths("favicon.ico")[0])
|
|
}
|
|
|
|
func InternalServerError(w http.ResponseWriter, err error) {
|
|
log.Fatal(err)
|
|
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
|
|
}
|