- added working typescript support to vue

- added bouncer support
- added UserPolicies
- added first user index call
This commit is contained in:
Sockenklaus
2023-07-08 08:16:08 +02:00
parent 6d28aaecb7
commit 864da02de5
23 changed files with 619 additions and 582 deletions

View File

@@ -2,7 +2,7 @@ import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
import { schema } from '@ioc:Adonis/Core/Validator'
export default class AuthController {
public async login({ auth, request, response, session }: HttpContextContract){
public async login({ auth, request, response }: HttpContextContract){
const loginSchema = schema.create({
@@ -18,27 +18,13 @@ export default class AuthController {
}
})
session.flash({
login: {
warning: 'test'
}
})
await auth.attempt(username, password)
response.redirect().toRoute('events.index')
}
public async logout({ auth, response, session }: HttpContextContract) {
public async logout({ auth, response }: HttpContextContract) {
await auth.logout()
session.flash('gfd', {
warning: 'test'
})
session.flash('login', {
warning: "noch eine warning"
})
response.redirect('/login')
}
}