Add doc to grist sync

This commit is contained in:
2025-10-27 11:35:52 +01:00
parent 9efccccc21
commit a2722d5f9f
2 changed files with 10 additions and 2 deletions

View File

@@ -433,7 +433,14 @@ def get_event_attendance_pdf(event_id: int, session: SessionDep):
@app.get("/event/{event_id}/sync_with_grist")
def sync_with_grist_route(event_id: int, session: SessionDep, user: StrictUserDep):
"""
Synchronizes the specified event with Grist and redirects the user.
This function retrieves the event by its identifier, synchronizes it with Grist,
and then redirects the user to the event page with a success message.
TODO: Error handling
"""
statement = select(Event).where(Event.id == event_id)
event = session.scalars(statement).one()