Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix bug in adding new sources
  • Loading branch information
cccs-rs authored Mar 9, 2025
2 parents 8bd0b48 + cda6b90 commit d8fd38e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/routes/manage/signature_sources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ const WrappedSourceDetailDrawer = ({

const saveChanges = () => {
apiCall({
method: base ? 'POST' : 'PUT',
url: base
method: base?.name ? 'POST' : 'PUT',
url: base?.name
? `/api/v4/signature/sources/${service}/${encodeURIComponent(source.name)}/`
: `/api/v4/signature/sources/${service}/`,
body: source,
onSuccess: () => {
showSuccessMessage(t(base ? 'change.success' : 'add.success'));
showSuccessMessage(t(base?.name ? 'change.success' : 'add.success'));
setModified(false);
if (!base || !isXL) onClose();
setTimeout(() => window.dispatchEvent(new CustomEvent('reloadUpdateSources')), 1000);
Expand Down

0 comments on commit d8fd38e

Please sign in to comment.