48 lines
423 B
Markdown
48 lines
423 B
Markdown
|
# Api specification
|
||
|
|
||
|
|
||
|
|
||
|
## Review
|
||
|
|
||
|
### Review model
|
||
|
|
||
|
```ts
|
||
|
{
|
||
|
id: number,
|
||
|
location: string,
|
||
|
title: string,
|
||
|
content: string,
|
||
|
stars: number
|
||
|
}
|
||
|
```
|
||
|
|
||
|
### GET reviews
|
||
|
|
||
|
#### Response
|
||
|
|
||
|
```ts
|
||
|
{
|
||
|
Review[]
|
||
|
}
|
||
|
```
|
||
|
|
||
|
### Post createReview
|
||
|
|
||
|
#### Request
|
||
|
|
||
|
```ts
|
||
|
{
|
||
|
location: string,
|
||
|
title: string,
|
||
|
content: string,
|
||
|
stars: number
|
||
|
}
|
||
|
```
|
||
|
|
||
|
#### Response
|
||
|
|
||
|
```ts
|
||
|
{
|
||
|
message: "Ok" | "Invalid request"
|
||
|
}
|
||
|
```
|