portfolio/api/handler/mainHandler.go
darius e1c3c5c8ee folder structure refactor
schema update
2024-02-14 14:55:41 +01:00

28 lines
542 B
Go

package handler
import (
"net/http"
)
func CatchAllHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusGone)
_, err := w.Write([]byte("Bad endpoint"))
if err != nil {
InternalServerErrorHandler(w, r)
}
}
func TestHandler(w http.ResponseWriter, r *http.Request) {
_, err := w.Write([]byte("test"))
if err != nil {
InternalServerErrorHandler(w, r)
}
}
func Test2Handler(w http.ResponseWriter, r *http.Request) {
_, err := w.Write([]byte("test2"))
if err != nil {
InternalServerErrorHandler(w, r)
}
}