Skip to content

Commit 6646d3d

Browse files
committed
update UI
1 parent e401969 commit 6646d3d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ui/pages/events/ManageEvent.page.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,14 @@ export const ManageEventPage: React.FC = () => {
204204
? values.metadata
205205
: undefined,
206206
};
207-
208207
const eventURL = isEditing
209208
? `/api/v1/events/${eventId}`
210209
: "/api/v1/events";
211-
await api.post(eventURL, realValues);
210+
if (isEditing) {
211+
await api.patch(eventURL, realValues);
212+
} else {
213+
await api.post(eventURL, realValues);
214+
}
212215
notifications.show({
213216
title: isEditing ? "Event updated!" : "Event created!",
214217
message: `Changes may take up to ${Math.ceil(EVENT_CACHED_DURATION / 60)} minutes to reflect to users.`,

0 commit comments

Comments
 (0)