26 lines
606 B
Go
26 lines
606 B
Go
package protected
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"git.coopgo.io/coopgo-apps/parcoursmob/core/application"
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
type Handler struct {
|
|
apiKey string
|
|
config *viper.Viper
|
|
applicationHandler *application.ApplicationHandler
|
|
}
|
|
|
|
func NewHandler(cfg *viper.Viper, appHandler *application.ApplicationHandler) *Handler {
|
|
return &Handler{
|
|
apiKey: cfg.GetString("services.api.api_key"),
|
|
config: cfg,
|
|
applicationHandler: appHandler,
|
|
}
|
|
}
|
|
|
|
func (h *Handler) NotFound(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusNotFound)
|
|
} |