revert: chore: remove deperecated api

This commit is contained in:
Steven
2023-11-22 20:27:11 +08:00
parent 01e49e23b5
commit 59e1281960
17 changed files with 1980 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import (
"github.com/pkg/errors"
"go.uber.org/zap"
apiv1 "github.com/boojack/slash/api/v1"
apiv2 "github.com/boojack/slash/api/v2"
"github.com/boojack/slash/internal/log"
storepb "github.com/boojack/slash/proto/gen/store"
@ -103,6 +104,10 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
s.Secret = secret
rootGroup := e.Group("")
// Register API v1 routes.
apiV1Service := apiv1.NewAPIV1Service(profile, store, licenseService)
apiV1Service.Start(rootGroup, secret)
s.apiV2Service = apiv2.NewAPIV2Service(secret, profile, store, licenseService, s.Profile.Port+1)
// Register gRPC gateway as api v2.
if err := s.apiV2Service.RegisterGateway(ctx, e); err != nil {