show user first impl.

This commit is contained in:
Sockenklaus
2023-07-08 22:17:39 +02:00
parent 39a28cbd14
commit decf693f4f
6 changed files with 76 additions and 17 deletions

View File

@@ -24,7 +24,15 @@ export default class UsersController {
public async store({}: HttpContextContract) {}
public async show({}: HttpContextContract) {}
public async show({ bouncer, params, inertia }: HttpContextContract) {
const queriedUser: User = await User.findByOrFail('id', params.id)
await bouncer
.with('UserPolicy')
.authorize('show', queriedUser)
return inertia.render('Users/Show', { queriedUser })
}
public async edit({}: HttpContextContract) {}