# Review

## 리뷰 등록

<mark style="color:green;">`POST`</mark> `/review/upload`

#### Cookies

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| token<mark style="color:red;">\*</mark> | String | accessToken |

#### Request Body

| Name                                             | Type   | Description  |
| ------------------------------------------------ | ------ | ------------ |
| receipts\_img<mark style="color:red;">\*</mark>  | String | route        |
| content<mark style="color:red;">\*</mark>        | String | content      |
| d\_name                                          | String | doctorName   |
| hospital\_name<mark style="color:red;">\*</mark> | String | hospitalName |
| users\_id<mark style="color:red;">\*</mark>      | int    | userId       |

{% tabs %}
{% tab title="201: Created 리뷰 등록 완료" %}

```javascript
{
    // Response
    "message": "리뷰등록 성공"
}
```

{% endtab %}

{% tab title="400: Bad Request 필수 정보가 빠졌을 때" %}

```javascript
{
    // Response
    "message": "잘못된 요청"
}
```

{% endtab %}

{% tab title="401: Unauthorized 토큰이 유효하지 않을 때" %}

```javascript
{
    // Response
    "message": "토큰이 유효하지 않음"
}
```

{% endtab %}
{% endtabs %}

## 리뷰 정보 가져오기

<mark style="color:green;">`POST`</mark> `/review/info`

#### Cookies

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| token<mark style="color:red;">\*</mark> | String | accessToken |

{% tabs %}
{% tab title="200: OK 리뷰 정보 요청 완료" %}

```javascript
{
    // Response
    "message": "리뷰 정보 요청 성공"
}
```

{% endtab %}

{% tab title="401: Unauthorized 토큰이 유효하지 않을 때" %}

```javascript
{
    // Response
    "message": "토큰이 유효하지 않음"
}
```

{% endtab %}
{% endtabs %}

## 리뷰 수정

<mark style="color:orange;">`PUT`</mark> `/review/modifiy`

#### Cookies

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| token<mark style="color:red;">\*</mark> | String | accessToken |

#### Request Body

| Name           | Type   | Description    |
| -------------- | ------ | -------------- |
| receipts\_img  | String | receipts\_img  |
| content        | String | content        |
| d\_name        | String | d\_name        |
| hospital\_name | String | hospital\_name |

{% tabs %}
{% tab title="200: OK 리뷰 수정 완료" %}

```javascript
{
    // Response
    "message": "리뷰 수정 성공"
```

{% endtab %}

{% tab title="401: Unauthorized 토큰이 유효하지 않을 때" %}

```javascript
{
    // Response
    "message": "토큰이 유효하지 않음"
}
```

{% endtab %}

{% tab title="403: Forbidden 자신의 리뷰가 아닐 때" %}

```javascript
{
    // Response
    "message": "권한이 없음"
}
```

{% endtab %}
{% endtabs %}

## 리뷰 삭제

<mark style="color:red;">`DELETE`</mark> `/review`

#### Cookies

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| token<mark style="color:red;">\*</mark> | String | accessToken |

{% tabs %}
{% tab title="200: OK 리뷰 삭제 완료" %}

```javascript
{
    // Response
    "message": "리뷰 삭제 완료"
}
```

{% endtab %}
{% endtabs %}
