-
Notifications
You must be signed in to change notification settings - Fork 2
Backend communication
URL of the backend:
https://oss-foundations-api.herokuapp.com
In order to create a good synchronization between frontend and backend, the requests that can be send are:
It retrieves the foundations in the database (only final foundations, not pending approval)
GET (URL)/foundations
PUT (URL)/foundations//edit/${idFoundation}, foundation
Params: foundation: the data of the foundation to edit
POST (URL)/foundations/pending, foundation
Params: foundation: the data of the foundation to edit
For this kind of requests it is needed to send a header with the bearer authentication token.
It retrieves all the foundations in the database
GET (URL)/foundations/all
PUT (URL)/foundations/${idFoundation}, foundation
Params: foundation: the data of the foundation to edit
POST (URL)/foundations/, foundation
Params: foundation: the data of the foundation to edit
DELETE(URL)/foundations/, idFoundation
Params: foundation: the data of the foundation to edit
For more information, you can check the file "api.js" in the Data folder.