Remove unused gRPC and JWT related code, including Woodpecker service definitions and JWT token management.

This commit is contained in:
2026-03-26 11:42:14 +07:00
parent 4de6baee61
commit fbbecd7674
36 changed files with 2708 additions and 4996 deletions

View File

@@ -13,7 +13,6 @@ import (
"gorm.io/gorm"
appv1 "stream.api/internal/api/proto/app/v1"
"stream.api/internal/database/model"
"stream.api/internal/video"
)
func (s *appServices) GetAdminDashboard(ctx context.Context, _ *appv1.GetAdminDashboardRequest) (*appv1.GetAdminDashboardResponse, error) {
@@ -491,7 +490,7 @@ func (s *appServices) CreateAdminVideo(ctx context.Context, req *appv1.CreateAdm
return nil, status.Error(codes.InvalidArgument, "Size must be greater than or equal to 0")
}
created, err := s.videoService.CreateVideo(ctx, video.CreateVideoInput{
created, err := s.videoService.CreateVideo(ctx, CreateVideoInput{
UserID: userID,
Title: title,
Description: req.Description,
@@ -503,11 +502,11 @@ func (s *appServices) CreateAdminVideo(ctx context.Context, req *appv1.CreateAdm
})
if err != nil {
switch {
case errors.Is(err, video.ErrUserNotFound):
case errors.Is(err, ErrUserNotFound):
return nil, status.Error(codes.InvalidArgument, "User not found")
case errors.Is(err, video.ErrAdTemplateNotFound):
case errors.Is(err, ErrAdTemplateNotFound):
return nil, status.Error(codes.InvalidArgument, "Ad template not found")
case errors.Is(err, video.ErrJobServiceUnavailable):
case errors.Is(err, ErrJobServiceUnavailable):
return nil, status.Error(codes.Unavailable, "Job service is unavailable")
default:
return nil, status.Error(codes.Internal, "Failed to create video")