update api structure
This commit is contained in:
@@ -39,11 +39,11 @@ The API will be a combination API and basic SSR.
|
|||||||
|
|
||||||
### Routes
|
### Routes
|
||||||
|
|
||||||
- /api - SSR Page: shows login form
|
- /api/home - SSR Page: shows login form
|
||||||
- /api/[userId] - SSR Page: provides import plan button to upload an existing xivplan url to the db, shows all user's plans (have section for deleted plans), each plan should have the following buttons: [Open], [Share], [Rename*] [Delete*] Buttons with a \* will prompt for PIN to confirm.
|
- /api/home/[userId] - SSR Page: provides import plan button to upload an existing xivplan url to the db, shows all user's plans (have section for deleted plans), each plan should have the following buttons: [Open], [Share], [Rename*] [Delete*] Buttons with a \* will prompt for PIN to confirm.
|
||||||
- /api/read/[planId] - API Page: **GET** returns name and data as JSON object
|
- /api/read/[planId] - API Page: **GET** returns name and data as JSON object
|
||||||
- /api/[userId]/list - API Page: **GET** returns non-deleted plans, specifically the name, id, and folder of each plan as a JSON array of objects
|
- /api/list/[userId] - API Page: **GET** returns non-deleted plans, specifically the name, id, and folder of each plan as a JSON array of objects
|
||||||
- /api/[userId]/export - API Page: **GET** returns zip of .xivplan files
|
- /api/export/[userId] - API Page: **GET** returns zip of .xivplan files
|
||||||
- /api/create - API Page: **POST** to save new plan to DB, requires name, **PIN**, and data (optionally folder), api will generate a nanoid for the PK
|
- /api/create - API Page: **POST** to save new plan to DB, requires name, **PIN**, and data (optionally folder), api will generate a nanoid for the PK
|
||||||
- /api/update/[planId] - API Page: **PUT** to overwrite plan while keeping same name and id, requires **PIN** and data
|
- /api/update/[planId] - API Page: **PUT** to overwrite plan while keeping same name and id, requires **PIN** and data
|
||||||
- /api/rename/[planId] - API Page: **PUT** to rename plan while keeping same data and id, requires **PIN** and name
|
- /api/rename/[planId] - API Page: **PUT** to rename plan while keeping same data and id, requires **PIN** and name
|
||||||
|
|||||||
Reference in New Issue
Block a user