mirror of
https://github.com/versity/versitygw.git
synced 2026-08-18 13:16:31 +00:00
fix: removed extra api call
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
package s3api
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/middleware/logger"
|
||||
"github.com/versity/scoutgw/backend"
|
||||
@@ -20,18 +17,7 @@ func New(app *fiber.App, be backend.Backend, port string) (s3ApiServer *S3ApiSer
|
||||
s3ApiServer = &S3ApiServer{app, be, new(S3ApiRouter), port}
|
||||
|
||||
app.Use(logger.New())
|
||||
|
||||
s3ApiServer.router.Init(app, be)
|
||||
app.All("/*", func(ctx *fiber.Ctx) error {
|
||||
|
||||
fmt.Println(ctx.Method())
|
||||
listBucket := new(s3.ListBucketsInput)
|
||||
if b, err := xml.Marshal(listBucket); err != nil {
|
||||
return err
|
||||
} else {
|
||||
return ctx.Send(b)
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user