improve api plan

This commit is contained in:
Ean Milligan
2026-04-09 16:52:46 -04:00
parent 52abe6f3a8
commit 6e4c448ba0

View File

@@ -44,8 +44,9 @@ The API will be a combination API and basic SSR.
- /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/[userId]/export - API Page: **GET** returns zip of .xivplan files
- /api/[userId]/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/rename/[planId] - API Page: **PUT** to rename plan while keeping same data and id, requires **PIN** and name
- /api/undelete/[planId] - API Page: **PUT** to unmark plan as deleted, requires **PIN**
- /api/delete/[planId] - API Page: **DELETE** to mark plan as deleted, requires **PIN**
- /api/auth - API Page: **POST** to check if you are who you say you are, requires username and **PIN**, returns userId and boolean of if email was set