Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Add User in Event Endpoint #50

Merged
merged 1 commit into from
Dec 1, 2024
Merged

Add User in Event Endpoint #50

merged 1 commit into from
Dec 1, 2024

Conversation

jzgom067
Copy link
Collaborator

What?

Adds the /user_in_event endpoint, which returns a user's availability if they have added theirs to the specified event. The format of data to send is as follows:

{
    [login info],
    "event_code": string
}

Why?

We need a way to check if a user has availability to edit, and what info to pre-populate the grid with.

How?

The same as I've been doing every other endpoint, though it required some fixing of the Availability class functions.

Testing?

I tested both scenarios, with users being in and out of events. Seems to work just fine, using already-implemented methods that have been working for other endpoints.

It involved a bit of fixing in the Availability from_sql() function, but it works well enough.
Copy link
Collaborator

@NickWang8 NickWang8 left a comment

Choose a reason for hiding this comment

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

lgtm!

@jzgom067 jzgom067 merged commit bdada68 into main Dec 1, 2024
2 checks passed
@jzgom067 jzgom067 deleted the in-event-endpoint branch December 1, 2024 05:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants