> For the complete documentation index, see [llms.txt](https://docs-58.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-58.gitbook.io/docs/api-methods/admin.md).

# Admin

## 유저 관리(밴 설정) 메서드

<mark style="color:blue;">`GET`</mark> `/admin/modify/userBan`

user의 isEnabled 값을 설정해 관

#### Query Parameters

| Name                                 | Type | Description  |
| ------------------------------------ | ---- | ------------ |
| id<mark style="color:red;">\*</mark> | Long | user의 id(PK) |

#### Headers

| Name                                            | Type   | Description              |
| ----------------------------------------------- | ------ | ------------------------ |
| Authorization<mark style="color:red;">\*</mark> | String | login시 발급 받은 accessToken |

{% tabs %}
{% tab title="200: OK " %}

```json
{
  "email": "test_f77c0d992b32",
  "username": "test_4bdc3bfad426",
  "oauthId": "test_665baa789f75",
  "oAuthProvider": "GOOGLE",
  "isBan": true,
  "accountType": "ROLE_USER"
}
```

{% endtab %}

{% tab title="404: Not Found 해당 id의 user가 없는 경우 발생" %}

{% endtab %}
{% endtabs %}

## Post 생성 메서드

<mark style="color:green;">`POST`</mark> `/admin/create/post`

#### Headers

| Name                                            | Type   | Description              |
| ----------------------------------------------- | ------ | ------------------------ |
| Authorization<mark style="color:red;">\*</mark> | String | login시 발급 받은 accessToken |

#### Request Body

| Name                                                                                  | Type | Description |
| ------------------------------------------------------------------------------------- | ---- | ----------- |
| restaurantName, category, hashTag, memberName, x, y<mark style="color:red;">\*</mark> | json |             |

{% tabs %}
{% tab title="204: No Content " %}

{% endtab %}
{% endtabs %}

## Post 변경 메서드

<mark style="color:purple;">`PATCH`</mark> `/admin/modify/post`

#### Query Parameters

| Name                                 | Type | Description  |
| ------------------------------------ | ---- | ------------ |
| id<mark style="color:red;">\*</mark> | Long | post의 id(pk) |

#### Request Body

| Name                                                                                  | Type | Description |
| ------------------------------------------------------------------------------------- | ---- | ----------- |
| restaurantName, category, hashTag, memberName, x, y<mark style="color:red;">\*</mark> | json |             |

{% tabs %}
{% tab title="200: OK " %}

```json
{
  "id": 10,
  "location": {},
  "restaurantName": "test_1a75c0a27641",
  "categories": [
    "test_f0a185acc9ef"
  ],
  "hashTags": [
    "test_b224fb893de0"
  ],
  "memberNames": [
    "test_63a25ec44a53"
  ],
  "scrapCount": 34,
  "visitorReviewScore": 82.25,
  "visitorReviewCount": 87
}
```

{% endtab %}

{% tab title="404: Not Found 해당 id의 post가 없는 경우 발생" %}

{% endtab %}
{% endtabs %}

## admin 로그인 메서드

<mark style="color:green;">`POST`</mark> `/admin/signin`

#### Request Body

| Name                                             | Type | Description |
| ------------------------------------------------ | ---- | ----------- |
| email, oauthId<mark style="color:red;">\*</mark> | json |             |

{% tabs %}
{% tab title="204: No Content " %}
header에 accessToken, refreshToken(httpOnlyCookie) 담아서 전달
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-58.gitbook.io/docs/api-methods/admin.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
