server v1.0.0

This commit is contained in:
2020-09-16 17:34:24 +02:00
parent a5232e7257
commit 27552e5eb0
13 changed files with 187 additions and 150 deletions

View File

@@ -103,7 +103,8 @@
Takes **restaurantId** query and returns a specific restaurant **JSON** if found. Else returns **400** if restaurantId is invalid, or **404** if specified restaurantId is not found.
- #### **POST**
Takes a **restaurant** document, and JWT **token (header)**, tries to create new restaurant in a database, and also add it to user restaurants list. Returns **201** on success. Else returns **401** on invalid token, and **400** on general error while adding restaurant.
- #### **PUT** - empty!
- #### **PUT**
Takes a **restaurantId** and updates it with a supplied document.
<br>
@@ -179,6 +180,14 @@
<br>
* ### **/search/location**
- #### **GET**
Takes a **lon, lat, and radius** query parameters and returns an **array** of restaurants in a specified radius from supplied location.
<br>
## **3. Important functions**
</br>