Niche API Documentation - v0.1.0
    Preparing search index...

    Function saveEventEntry

    • Upserts or deletes a row in user_events for the authenticated user.

      • status: "none" — removes the event from the user's list entirely.
      • status: "bookmark" — saves the event for later; rating and note are ignored.
      • status: "done" — marks attended; optionally stores a 1–5 rating and free-text note.

      Calls refresh() on success so the feed reflects the change immediately.

      Parameters

      • _prev: EventEntryState

        Previous form state (unused; required by useActionState).

      • formData: FormData

        Must include eventId and status; optionally rating and note.

      Returns Promise<EventEntryState>

      EventEntryState with saved: true on success, or error on failure.