Create Berita
To create the data in the specified collection with the specified parameters. When a JSON object is saved, the object properties are automatically added to the collection you specified.
Method : POST
URL : /news
Body : Form Data
Field | Type | Required |
---|---|---|
title | String | ✔️ |
cover | JPG/PNG | |
description | string | ✔️ |
kategori[] | string | ✔️ |
kategori[] | string | ✔️ |
Response : 200 OK
{ "message": "Success add news", "status": 200}
Response : 422 UNPROCESSABLE CONTENT
{ "error": { "title": ["Judul tidak boleh kosong"], "description": ["Deskripsi tidak boleh kosong"], "kategori": ["Kategori tidak boleh kosong"] }}
Response : 500 ERROR
Internal Server Error