working commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"mstore/app/router"
|
||||
)
|
||||
|
||||
func (hand *Handler) NotFound(rctx *router.Context) {
|
||||
hand.logg.Debugf("Route for [%s %s] not found", rctx.Request.Method, rctx.Request.URL.String())
|
||||
rctx.SetStatus(http.StatusNotFound)
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"mstore/app/operator"
|
||||
"mstore/app/router"
|
||||
)
|
||||
|
||||
// GET /v2/ 200 404/401
|
||||
func (hand *Handler) GetVersion(rctx *router.Context) {
|
||||
params := &operator.GetVersionParams{}
|
||||
ctx := rctx.GetContext()
|
||||
_, code, err := hand.oper.GetVersion(ctx, params)
|
||||
if err != nil {
|
||||
hand.logg.Errorf("GetVersion error: %v", err)
|
||||
}
|
||||
rctx.SetStatus(code)
|
||||
}
|
||||
Reference in New Issue
Block a user