mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-02-02 04:47:56 +01:00
Remove auth middleware to get files
This commit is contained in:
@@ -12,8 +12,9 @@ Route.group(() => {
|
|||||||
Route.resource('/translations', 'TranslationsController').except(['edit', 'create'])
|
Route.resource('/translations', 'TranslationsController').except(['edit', 'create'])
|
||||||
|
|
||||||
Route.resource('/files', 'FilesController').only(['index', 'store', 'destroy'])
|
Route.resource('/files', 'FilesController').only(['index', 'store', 'destroy'])
|
||||||
Route.get('/files/:filename', async ({response, params}) => {
|
|
||||||
response.download(Application.makePath('storage', params.filename))
|
|
||||||
})
|
|
||||||
|
|
||||||
}).middleware('auth')
|
}).middleware('auth')
|
||||||
|
|
||||||
|
Route.get('/files/:filename', async ({response, params}) => {
|
||||||
|
response.download(Application.makePath('storage', params.filename))
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user