working on flashmessages
This commit is contained in:
@@ -11,9 +11,8 @@
|
||||
import Inertia from '@ioc:EidelLev/Inertia'
|
||||
|
||||
Inertia.share({
|
||||
errors: ({session}) => {
|
||||
return session.flashMessages.get('errors')
|
||||
},
|
||||
//errors: ({session}) => session.flashMessages.get('errors'),
|
||||
request: ({ request }) => request,
|
||||
isAdmin: ({ auth }) => auth.user?.isAdmin,
|
||||
flashMessages: ({ session }) => session.flashMessages.all(),
|
||||
}).version(() => Inertia.manifestFile('public/assets/manifest.json'))
|
||||
|
||||
@@ -26,6 +26,7 @@ Route.get('/', 'HomeController.index')
|
||||
Route.get('/login', async({inertia}: HttpContextContract) =>{
|
||||
return inertia.render('Login')
|
||||
})
|
||||
Route.post('/logout', 'AuthController.logout')
|
||||
|
||||
Route.post('login', 'AuthController.login')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user