Skip to content

Commit 6dd16e9

Browse files
committed
code cleanup
1 parent 0c2da21 commit 6dd16e9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/api/routes/tickets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ const ticketsPlugin: FastifyPluginAsync = async (fastify, _options) => {
278278
return reply.send(response);
279279
},
280280
);
281-
fastify.post<TicketsPostRequest>(
281+
fastify.patch<TicketsPostRequest>(
282282
"/:eventId",
283283
{
284284
onRequest: async (request, reply) => {

src/ui/pages/tickets/SelectEventId.page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,11 @@ const SelectTicketsPage: React.FC = () => {
181181
itemSalesActive: newIsActive,
182182
type: isTicketItem(item) ? 'ticket' : 'merch',
183183
};
184-
await api.post(`/api/v1/tickets/${item.itemId}`, data);
184+
await api.patch(`/api/v1/tickets/${item.itemId}`, data);
185185
await fetchItems();
186186
notifications.show({
187-
message: 'Item status changed!',
187+
title: 'Changes saved',
188+
message: `Sales for ${item.itemName} are ${newIsActive ? 'enabled' : 'disabled'}!`,
188189
});
189190
} catch (error) {
190191
console.error('Error setting new status:', error);

0 commit comments

Comments
 (0)