Skip to content

Conversation

@hei98
Copy link
Contributor

@hei98 hei98 commented Feb 3, 2026

Fixes editing events which previously created a new event instead of updating the existing one. Also resolves issues with the event images not being update correctly.

Editing av event was always triggering POST, which is why a new event was created instead of updating the existing one. The PR adds a check to do PUT when the event has an ID. Also, now the frontend sends image_id instead of image when updating an event.

@hei98 hei98 marked this pull request as ready for review February 3, 2026 21:00
};

postEvent(payload)
const request = id ? putEvent(id, payload) : postEvent(payload);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gjerne buk mutations fra React Query

Copy link
Contributor

@Madt2 Madt2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Koden ser bra ut som jeg kan se, men jeg får ikke lagret arrangement som jeg ikke har lagd selv, men det funker på de jeg har laget selv.

Skjermopptak.2026-02-10.kl.20.40.27.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants