Browse Source

修复错误的路由

gitlink
Sydonian 8 months ago
parent
commit
8fc55e3edf
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      client/internal/http/server.go

+ 2
- 2
client/internal/http/server.go View File

@@ -48,7 +48,7 @@ func (s *Server) initRouters() {
s.routeV1(s.engine, rt) s.routeV1(s.engine, rt)


rt.GET(cdsapi.ObjectListPathByPath, s.Object().ListByPath) rt.GET(cdsapi.ObjectListPathByPath, s.Object().ListByPath)
rt.POST(cdsapi.ObjectListByIDsPath, s.Object().ListByIDs)
rt.GET(cdsapi.ObjectListByIDsPath, s.Object().ListByIDs)
rt.GET(cdsapi.ObjectDownloadPath, s.Object().Download) rt.GET(cdsapi.ObjectDownloadPath, s.Object().Download)
rt.GET(cdsapi.ObjectDownloadByPathPath, s.Object().DownloadByPath) rt.GET(cdsapi.ObjectDownloadByPathPath, s.Object().DownloadByPath)
rt.POST(cdsapi.ObjectUploadPath, s.Object().Upload) rt.POST(cdsapi.ObjectUploadPath, s.Object().Upload)
@@ -85,7 +85,7 @@ func (s *Server) routeV1(eg *gin.Engine, rt gin.IRoutes) {
v1 := eg.Group("/v1") v1 := eg.Group("/v1")


v1.GET(cdsapi.ObjectListPathByPath, s.awsAuth.Auth, s.Object().ListByPath) v1.GET(cdsapi.ObjectListPathByPath, s.awsAuth.Auth, s.Object().ListByPath)
v1.POST(cdsapi.ObjectListByIDsPath, s.awsAuth.Auth, s.Object().ListByIDs)
v1.GET(cdsapi.ObjectListByIDsPath, s.awsAuth.Auth, s.Object().ListByIDs)
v1.GET(cdsapi.ObjectDownloadPath, s.awsAuth.Auth, s.Object().Download) v1.GET(cdsapi.ObjectDownloadPath, s.awsAuth.Auth, s.Object().Download)
v1.GET(cdsapi.ObjectDownloadByPathPath, s.awsAuth.Auth, s.Object().DownloadByPath) v1.GET(cdsapi.ObjectDownloadByPathPath, s.awsAuth.Auth, s.Object().DownloadByPath)
v1.POST(cdsapi.ObjectUploadPath, s.awsAuth.AuthWithoutBody, s.Object().Upload) v1.POST(cdsapi.ObjectUploadPath, s.awsAuth.AuthWithoutBody, s.Object().Upload)


Loading…
Cancel
Save