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

# My page

회원가입을 하거나 로그인에 성공한 후 유저 정보를 요청한다.

## Get userinfo

<mark style="color:blue;">`GET`</mark> `https://eton.io/users/userinfo`

#### Headers

| Name          | Type   | Description  |
| ------------- | ------ | ------------ |
| authorization | string | Access token |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "data": {
      "userInfo": {
          "id": user_id
          "username": string,
          "email": string,
          "picture": string
      }
    },
    "message": "Ok"
}
```

{% endtab %}

{% tab title="403 Could not find a cake matching this query." %}

```
{ "message": "Invalid access token." }
```

{% endtab %}

{% tab title="404 " %}

```
{ "message": "Access token has been tempered." }
```

{% endtab %}
{% endtabs %}

## Get userinfo by username

<mark style="color:blue;">`GET`</mark> `/users/userinfo/:username`

// notion에서 member로 이동

#### Path Parameters

| Name     | Type   | Description                       |
| -------- | ------ | --------------------------------- |
| username | string | The user you want to get info of. |

#### Headers

| Name          | Type   | Description  |
| ------------- | ------ | ------------ |
| authorization | string | Access Token |

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

```
{
    "data" : {
        "userInfo" : { userInfo (except pw) },
    },
    "message": "Ok."
}
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}

{% tab title="404 " %}

```
{
    "message": "There's no user or please submit correct name."
}
```

{% endtab %}
{% endtabs %}

## Modify userinfo

<mark style="color:orange;">`PUT`</mark> `/users/userinfo`

&#x20;

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

#### Request Body

| Name     | Type   | Description          |
| -------- | ------ | -------------------- |
| email    | string | The user's email.    |
| password | string | The user's password. |
| username | string | The user's nickname. |

{% tabs %}
{% tab title="201 " %}

```
{
    "message": "Your info got modified."
}
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}

{% tab title="404 " %}

```
{
    "message": "Not found."
}
```

{% endtab %}
{% endtabs %}

## Get the user's tasks

<mark style="color:blue;">`GET`</mark> `/users/:user_id/mytask`

#### Path Parameters

| Name     | Type    | Description    |
| -------- | ------- | -------------- |
| user\_id | integer | The user's ID. |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

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

```
{ 
    "data": {
        "myTask": 
        {
            "title" : {boards_title},
            "taskList" :
             [
                {
                    id : 1,
                    title : 'create',
                    
                },  {
                    id : 2,
                    title : 'read',
                }
            ]
        },
        {
            "title": {boards_title2},
            "taskList":
            [
                {
                    id : 4,
                    title : 'update',
                    
                },  {
                    id : 6,
                    title : 'delete',
                },  {
                    id : 7,
                    title : 'test',
                }
            ]
        }
    },
    "message": "ok"
}
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}

{% tab title="404 " %}

```
{ "message": "Not found." }
```

{% endtab %}
{% endtabs %}

* user*id가 있는 board를 찾고, 해당 board\_id의 prg\_priority에 있는 progresses 찾는다.*
* 각 progress의 task\_priority에 있는 task를 모두 담아서 응답.
