-
Notifications
You must be signed in to change notification settings - Fork 110
Backend Routes
Wayne Su edited this page Apr 27, 2020
·
4 revisions
-
GET /StaticPagesController#root
-
POST /api/users- Sign up
-
POST /api/session- Sign in -
DELETE /api/session- Sign out
-
GET /api/designs- Get designs for currentUser/folder/public_templates, can be filtered via ajaxdata/paramsby userId/folderId/title/tags -
GET /api/designs/:id- Get specific design for Editor -
POST /api/designs- Create a new design -
PATCH /api/designs/:id- Update design or design meta data (does update include elements on the design?) -
DELETE /api/designs/:id- Remove specific design
How do I get the templateModal to use the same show controller? should I have another api/template controller(w/o model)?
-
GET /api/designs/:design_id/elements- Get all elements on this design -
GET /api/elements/:id- Get all properties on the element (joins) -
POST /api/elements- Create an element (could it post to mutilple tables with one controller?) -
PATCH /api/elements/:id- Update an element -
DELETE /api/elements/:id- Delete an element
The POST, PATCH, DELETE, could it also update other table's entries tied to the element? e.g. if I updated a shape's width, can I update both elements & shapes table in the same API call?
-
GET /api/stockphotos- Get all available stockphoto, can be filtered via ajaxdata/paramsby tags/title -
GET /api/stockphotos/:id- Get more info on a specific stockphoto, tags association, recommended association
-
GET /api/uploaded_images- Get all uploaded images for current user -
GET /api/uploaded_images/:id- Get more info on a specific image -
POST /api/uploaded_images- Upload a new image -
PATCH /api/uploaded_images/:id- Update metadata for a specific image -
DELETE /api/uploaded_images/:id- Remove a specific image
-
POST /api/likes- Add like to a stockphoto/public design(template) -
DELETE /api/likes/:id- Remove like
-
GET /api/tags?design- Get available tags for templates -
GET /api/tags?stockphoto- Get available tags for stockphotos
I should seperate the two kinds of tags into different tables shouldn't I?
-
POST /api/tags- Add tag to a design -
DELETE /api/tags/:id- Remove tag
-
GET /api/folders- Get folders for currentUser -
POST /api/folders- Create a new folder -
PATCH /api/folders/:id- Rename a folder -
DELETE /api/folders/:id- Remove folder
How do I manage static folders that are created for each user? e.g. all-designs/likes/(shared)/uploads/purchased/trash