Open traitboundnotsatisfied opened 10 months ago
Should have the following endpoints:
POST request to /api/user/update_settings/gen
Expects something like:
name=John+Doe&phone=123-456-7890&email=jdoe%40example.com&pss=on&ppl-min=0&ppl-max=10
(pps is prefer same section, ppl is short for people)
This is the standard way HTML encodes form data, so look for that (you shouldn't have to roll your own parser).
POST to /api/user/availability
:
[
[],
[{"start":"10:00","end":"11:00"}],
[{"start":"10:00","end":"11:00"}],
[{"start":"10:00","end":"11:00"},{"start":"14:00","end":"18:00"}],
[{"start":"10:00","end":"11:00"}],
[],
[]
]
There are seven lists, one for each day of week. The first is Sunday.
This is a POST to /api/user/update_settings/classes_from_pdf
. It should send you a file as the pdf
field. I don't know how to deal with this in spring boot.
There should be a way to GET /api/user/missing_settings
which gives you which settings are missing. I haven't done anything with this yet but will.
The missing_settings endpoint should return something like:
["profile", "classes", "availability"]
in the array means its missing, and not there means its not and we chillin boiz
Update: @SizableShrimp started this but only general and missing, and still needs to make it handle the case where you don't yet have a user (for missing it needs to say everything is missing, for general/classes/availabikity it needs to make one)
second problem reoslved
There are a few endpoints for processing the data when users update they're settings. These are:
/api/user/update_settings/gen
(general)/api/user/update_settings/classes_from_pdf
/api/user/update_settings/ava
(availability)/api/user/settings_missing
which tells you which of these categories have been filled out and which have not. I'll add more details soon, but could also just work on it.