chore: retire unused service

This commit is contained in:
Steven
2024-08-27 23:42:37 +08:00
parent 9d6d93ab39
commit 784d91ab75
10 changed files with 0 additions and 75 deletions

View File

@ -17,7 +17,6 @@ import (
"github.com/yourselfhosted/slash/plugin/idp/oauth2"
v1pb "github.com/yourselfhosted/slash/proto/gen/api/v1"
storepb "github.com/yourselfhosted/slash/proto/gen/store"
"github.com/yourselfhosted/slash/server/metric"
"github.com/yourselfhosted/slash/server/service/license"
"github.com/yourselfhosted/slash/store"
)
@ -53,7 +52,6 @@ func (s *APIV1Service) SignIn(ctx context.Context, request *v1pb.SignInRequest)
if err := s.doSignIn(ctx, user, time.Now().Add(AccessTokenDuration)); err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to sign in, err: %s", err))
}
metric.Enqueue("user sign in")
return convertUserFromStore(user), nil
}
@ -181,7 +179,6 @@ func (s *APIV1Service) SignUp(ctx context.Context, request *v1pb.SignUpRequest)
if err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to create user, err: %s", err))
}
metric.Enqueue("user sign up")
if err := s.doSignIn(ctx, user, time.Now().Add(AccessTokenDuration)); err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to sign in, err: %s", err))
}

View File

@ -11,7 +11,6 @@ import (
v1pb "github.com/yourselfhosted/slash/proto/gen/api/v1"
storepb "github.com/yourselfhosted/slash/proto/gen/store"
"github.com/yourselfhosted/slash/server/metric"
"github.com/yourselfhosted/slash/server/service/license"
"github.com/yourselfhosted/slash/store"
)
@ -131,7 +130,6 @@ func (s *APIV1Service) CreateCollection(ctx context.Context, request *v1pb.Creat
return nil, status.Errorf(codes.Internal, "failed to create collection, err: %v", err)
}
metric.Enqueue("collection create")
return convertCollectionFromStore(collection), nil
}

View File

@ -17,7 +17,6 @@ import (
v1pb "github.com/yourselfhosted/slash/proto/gen/api/v1"
storepb "github.com/yourselfhosted/slash/proto/gen/store"
"github.com/yourselfhosted/slash/server/metric"
"github.com/yourselfhosted/slash/server/service/license"
"github.com/yourselfhosted/slash/store"
)
@ -175,7 +174,6 @@ func (s *APIV1Service) CreateShortcut(ctx context.Context, request *v1pb.CreateS
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to convert shortcut, err: %v", err)
}
metric.Enqueue("shortcut create")
return composedShortcut, nil
}
@ -322,7 +320,6 @@ func (s *APIV1Service) GetShortcutAnalytics(ctx context.Context, request *v1pb.G
browserMap[browserName]++
}
metric.Enqueue("shortcut analytics")
response := &v1pb.GetShortcutAnalyticsResponse{
References: mapToAnalyticsSlice(referenceMap),
Devices: mapToAnalyticsSlice(deviceMap),