mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-28 02:20:27 +01:00
add volume
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -108,3 +108,4 @@ dist
|
|||||||
|
|
||||||
# AdonisJS
|
# AdonisJS
|
||||||
database/seeders
|
database/seeders
|
||||||
|
build
|
||||||
|
|||||||
@@ -12,12 +12,8 @@ Route.group(() => {
|
|||||||
Route.resource('/locations', 'LocationsController').only(['index', 'store'])
|
Route.resource('/locations', 'LocationsController').only(['index', 'store'])
|
||||||
|
|
||||||
Route.resource('/files', 'FileController').only(['index', 'store', 'destroy'])
|
Route.resource('/files', 'FileController').only(['index', 'store', 'destroy'])
|
||||||
|
Route.get('/files/:filename', async ({response, params}) => {
|
||||||
Route.group(() => {
|
response.download(Application.makePath('storage', params.filename))
|
||||||
Route.get('/', 'FileController.index')
|
})
|
||||||
Route.get('/:filename', async ({response, params}) => {
|
|
||||||
response.download(Application.makePath('storage', params.filename))
|
|
||||||
})
|
|
||||||
}).prefix('/files')
|
|
||||||
|
|
||||||
}).middleware('auth')
|
}).middleware('auth')
|
||||||
|
|||||||
Reference in New Issue
Block a user