# Article Update

## Article Update

<mark style="color:orange;">`PUT`</mark> `https://api-my-news.herokuapp.com/api/article/{id}/update`

Harus login terlebih dahulu

#### Request Body

| Name             | Type    | Description |
| ---------------- | ------- | ----------- |
| content\_article | string  |             |
| title            | string  |             |
| category\_id     | integer |             |

{% tabs %}
{% tab title="200 Berhasil mengubah artikel" %}

```
{
  "message": "Berhasil Mengubah Artikel",
  "status": true,
  "data": {
    "id": 1,
    "user_id": 1,
    "category_id": "1",
    "title": "Seorang Mahasiswa diduga depresi karena teralu sering onani",
    "content": "Seorang Mahasiswa diduga depresi karena teralu sering onani",
    "image": "https:\/\/enews.s3.ap-southeast-1.amazonaws.com\/uploads\/articles1597389624jpg",
    "status": 1,
    "created_at": "2020-08-14T07:20:32.000000Z",
    "updated_at": "2020-08-23T08:58:08.000000Z"
  }
}
```

{% endtab %}

{% tab title="400 kolom tidak boleh ada yang kosong" %}

```
{
  "message": {
    "title": [
      "The title field is required."
    ]
  },
  "status": false,
  "data": {}
}
```

{% endtab %}
{% endtabs %}
