feat: trim space on webhook url (#4411)

pull/4414/head
ProjectOrangeJuice 2 weeks ago committed by GitHub
parent 174b8b048a
commit 9f25bb2034
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3,6 +3,7 @@ package v1
import (
"context"
"fmt"
"strings"
"time"
"google.golang.org/grpc/codes"
@ -23,7 +24,7 @@ func (s *APIV1Service) CreateWebhook(ctx context.Context, request *v1pb.CreateWe
webhook, err := s.Store.CreateWebhook(ctx, &store.Webhook{
CreatorID: currentUser.ID,
Name: request.Name,
URL: request.Url,
URL: strings.TrimSpace(request.Url),
})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to create webhook, error: %+v", err)

Loading…
Cancel
Save