working commit

This commit is contained in:
2026-02-07 14:10:54 +02:00
parent 90905ace89
commit cd274d614a
12 changed files with 124 additions and 276 deletions
+7 -7
View File
@@ -10,7 +10,7 @@
package handler
import (
"net/http"
"net/http"
"mstore/app/operator"
"mstore/app/router"
@@ -21,12 +21,12 @@ func (hand *Handler) GetVersion(rctx *router.Context) {
params := &operator.GetVersionParams{}
hand.DumpHeaders("GetVersion", rctx)
authorization := rctx.GetHeader("Authorization")
if authorization == "" {
rctx.SetHeader("WWW-Authenticate", `Basic realm="mstore"`)
rctx.SetStatus(http.StatusUnauthorized)
return
}
authorization := rctx.GetHeader("Authorization")
if authorization == "" {
rctx.SetHeader("WWW-Authenticate", `Basic realm="mstore"`)
rctx.SetStatus(http.StatusUnauthorized)
return
}
ctx := rctx.GetContext()
_, code, err := hand.oper.GetVersion(ctx, params)
if err != nil {