Skip to content

Commit

Permalink
fix(webhooks-fe): trim webhook secret on input
Browse files Browse the repository at this point in the history
Removes leading and trailing whitespace from webhook secrets to prevent validation issues.
  • Loading branch information
samyakpiya committed Dec 24, 2024
1 parent 88aaf87 commit 3ba9f9a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
import styled from '@emotion/styled';
import { useMemo, useState } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
Expand All @@ -14,7 +15,6 @@ import {
Section,
useIcons,
} from 'twenty-ui';
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';

import { AnalyticsActivityGraph } from '@/analytics/components/AnalyticsActivityGraph';
import { AnalyticsGraphEffect } from '@/analytics/components/AnalyticsGraphEffect';
Expand Down Expand Up @@ -303,7 +303,7 @@ export const SettingsDevelopersWebhooksDetail = () => {
placeholder="Write a secret"
value={secret}
onChange={(secret: string) => {
setSecret(secret);
setSecret(secret.trim());
setIsDirty(true);
}}
fullWidth
Expand Down

0 comments on commit 3ba9f9a

Please sign in to comment.