This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "71559e64-9092-4bbf-9956-0a4651e5bab8", | |
"name": "Adonis-Minio", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "UPLOAD", | |
"request": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const Route = use('Route') | |
const Drive = use('Drive') | |
const Helpers = use('Helpers') | |
Route.on('/').render('welcome') | |
Route.post('minio', async ({ request, response }) => { | |
const file = request.file('image') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/api/time: | |
get: | |
tags: | |
- Test | |
summary: Show current time | |
responses: | |
200: | |
description: Show current time | |
example: | |
message: "Time: Sun Mar 04 2018 12:11:21 GMT+0700 (SE Asia Standard Time)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
class TestController { | |
/** | |
* @swagger | |
* /api/hello: | |
* get: | |
* tags: | |
* - Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const Route = use('Route') | |
Route.on('/').render('welcome') | |
Route.group(() => { | |
/** | |
* @swagger | |
* /api: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
csrf: { | |
enable: true, | |
methods: ['POST', 'PUT', 'DELETE'], | |
filterUris: [ | |
'/api(.*)' // yang baru ditambahkan | |
], | |
cookieOptions: { | |
httpOnly: false, | |
sameSite: true, | |
path: '/', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
class TestController { | |
/** | |
* @swagger | |
* /api/hello: | |
* get: | |
* tags: | |
* - Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const Route = use('Route') | |
Route.on('/').render('welcome') | |
Route.group(() => { | |
/** | |
* @swagger | |
* /api: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const Route = use('Route') | |
Route.on('/').render('welcome') | |
Route.group(() => { | |
/** | |
* @swagger | |
* /api: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
module.exports = { | |
/* | |
|-------------------------------------------------------------------------- | |
| Swagger Information | |
| Please use Swagger 2 Spesification Docs | |
| https://swagger.io/docs/specification/2-0/basic-structure/ | |
|-------------------------------------------------------------------------- | |
*/ |