working commit

This commit is contained in:
2026-02-14 15:03:47 +02:00
parent 4a779007b5
commit 789119266a
14 changed files with 627 additions and 69 deletions
+16 -5
View File
@@ -41,7 +41,7 @@ func (hand *Handler) FileInfo(rctx *router.Context) {
}
// Execution of the operation
ctx := rctx.GetContext()
code, res, err := hand.oper.FileInfo(ctx, params)
code, res, err := hand.oper.FileInfo(ctx, operatorID, params)
if err != nil {
hand.logg.Errorf("FileInfo error: %v", err)
rctx.SetStatus(code)
@@ -53,6 +53,11 @@ func (hand *Handler) FileInfo(rctx *router.Context) {
rctx.SetHeader("Content-Size", res.ContentSize)
rctx.SetHeader("Content-Digest", res.ContentDigest)
rctx.SetHeader("Content-CreatedAt", res.ContentCreatedAt)
rctx.SetHeader("Content-CreatedBy", res.ContentCreatedBy)
rctx.SetHeader("Content-UpdatedAt", res.ContentUpdatedAt)
rctx.SetHeader("Content-UpdatedBy", res.ContentUpdatedBy)
rctx.SetHeader("Content-Length", zeroContentLength)
rctx.SetStatus(code)
}
@@ -83,7 +88,7 @@ func (hand *Handler) PutFile(rctx *router.Context) {
}
// Execution of the operation
ctx := rctx.GetContext()
code, _, err := hand.oper.PutFile(ctx, params)
code, _, err := hand.oper.PutFile(ctx, operatorID, params)
if err != nil {
hand.logg.Errorf("PutFile error: %v", err)
rctx.SetStatus(code)
@@ -113,7 +118,7 @@ func (hand *Handler) GetFile(rctx *router.Context) {
}
// Execution of the operation
ctx := rctx.GetContext()
code, res, err := hand.oper.GetFile(ctx, params)
code, res, err := hand.oper.GetFile(ctx, operatorID, params)
if err != nil {
hand.logg.Errorf("PutFile error: %v", err)
rctx.SetStatus(code)
@@ -124,6 +129,12 @@ func (hand *Handler) GetFile(rctx *router.Context) {
rctx.SetHeader("Content-Size", res.ContentSize)
rctx.SetHeader("Content-Digest", res.ContentDigest)
rctx.SetHeader("Content-Length", res.ContentSize)
rctx.SetHeader("Content-CreatedAt", res.ContentCreatedAt)
rctx.SetHeader("Content-CreatedBy", res.ContentCreatedBy)
rctx.SetHeader("Content-UpdatedAt", res.ContentUpdatedAt)
rctx.SetHeader("Content-UpdatedBy", res.ContentUpdatedBy)
rctx.SetStatus(code)
if res.Source != nil {
@@ -157,7 +168,7 @@ func (hand *Handler) DeleteFile(rctx *router.Context) {
}
// Execution of the operation
ctx := rctx.GetContext()
code, _, err := hand.oper.DeleteFile(ctx, params)
code, _, err := hand.oper.DeleteFile(ctx, operatorID, params)
if err != nil {
hand.logg.Errorf("GetFile error: %v", err)
}
@@ -189,7 +200,7 @@ func (hand *Handler) ListFiles(rctx *router.Context) {
}
// Execution of the operation
ctx := rctx.GetContext()
code, res, err := hand.oper.ListFiles(ctx, params)
code, res, err := hand.oper.ListFiles(ctx, operatorID, params)
if err != nil {
hand.logg.Errorf("ListFiles error: %v", err)
rctx.SetStatus(code)