add volume

This commit is contained in:
2021-08-11 20:44:28 +02:00
parent 156763694f
commit 07cefcb385
2 changed files with 4 additions and 7 deletions

View File

@@ -12,12 +12,8 @@ Route.group(() => {
Route.resource('/locations', 'LocationsController').only(['index', 'store'])
Route.resource('/files', 'FileController').only(['index', 'store', 'destroy'])
Route.group(() => {
Route.get('/', 'FileController.index')
Route.get('/:filename', async ({response, params}) => {
response.download(Application.makePath('storage', params.filename))
})
}).prefix('/files')
Route.get('/files/:filename', async ({response, params}) => {
response.download(Application.makePath('storage', params.filename))
})
}).middleware('auth')