chore: code clean

This commit is contained in:
Steven
2024-03-12 21:45:19 +08:00
parent 5c1c238453
commit 07d9436e1e
21 changed files with 4 additions and 3242 deletions

View File

@@ -25,7 +25,6 @@ type APIV2Service struct {
apiv1pb.UnimplementedUserSettingServiceServer
apiv1pb.UnimplementedShortcutServiceServer
apiv1pb.UnimplementedCollectionServiceServer
apiv1pb.UnimplementedMemoServiceServer
Secret string
Profile *profile.Profile
@@ -60,7 +59,6 @@ func NewAPIV2Service(secret string, profile *profile.Profile, store *store.Store
apiv1pb.RegisterUserSettingServiceServer(grpcServer, apiV2Service)
apiv1pb.RegisterShortcutServiceServer(grpcServer, apiV2Service)
apiv1pb.RegisterCollectionServiceServer(grpcServer, apiV2Service)
apiv1pb.RegisterMemoServiceServer(grpcServer, apiV2Service)
reflection.Register(grpcServer)
return apiV2Service
@@ -105,9 +103,6 @@ func (s *APIV2Service) RegisterGateway(ctx context.Context, e *echo.Echo) error
if err := apiv1pb.RegisterCollectionServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
if err := apiv1pb.RegisterMemoServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
e.Any("/api/v1/*", echo.WrapHandler(gwMux))
// GRPC web proxy.