chore: remove unused resource route

This commit is contained in:
Steven
2024-07-28 23:54:53 +08:00
parent 51ed88d5aa
commit 2ad51a3d42
4 changed files with 0 additions and 61 deletions
-6
View File
@@ -18,7 +18,6 @@ import (
apiv1 "github.com/yourselfhosted/slash/server/route/api/v1"
"github.com/yourselfhosted/slash/server/route/frontend"
"github.com/yourselfhosted/slash/server/service/license"
"github.com/yourselfhosted/slash/server/service/resource"
"github.com/yourselfhosted/slash/store"
)
@@ -70,17 +69,12 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
return c.String(http.StatusOK, "Service ready.")
})
rootGroup := e.Group("")
s.apiV1Service = apiv1.NewAPIV1Service(secret, profile, store, licenseService, s.Profile.Port+1)
// Register gRPC gateway as api v1.
if err := s.apiV1Service.RegisterGateway(ctx, e); err != nil {
return nil, errors.Wrap(err, "failed to register gRPC gateway")
}
// Register resource service.
resourceService := resource.NewResourceService(profile, store)
resourceService.Register(rootGroup)
return s, nil
}