2023-02-10 07:45:40 +00:00
|
|
|
# Api specification
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Review
|
|
|
|
|
|
|
|
### Review model
|
|
|
|
|
|
|
|
```ts
|
|
|
|
{
|
|
|
|
id: number,
|
|
|
|
location: string,
|
|
|
|
title: string,
|
|
|
|
content: string,
|
|
|
|
stars: number
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### GET reviews
|
|
|
|
|
|
|
|
#### Response
|
|
|
|
|
|
|
|
```ts
|
|
|
|
{
|
2023-02-10 10:09:48 +00:00
|
|
|
reviews: Review[]
|
2023-02-10 07:45:40 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Post createReview
|
|
|
|
|
|
|
|
#### Request
|
|
|
|
|
|
|
|
```ts
|
|
|
|
{
|
|
|
|
location: string,
|
|
|
|
title: string,
|
|
|
|
content: string,
|
|
|
|
stars: number
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Response
|
|
|
|
|
|
|
|
```ts
|
|
|
|
{
|
|
|
|
message: "Ok" | "Invalid request"
|
|
|
|
}
|
|
|
|
```
|