fix: TS errors, serialize calls, unused imports, pre-commit hook

This commit is contained in:
Kevin committed 2026-07-07 20:49:52 +02:00
1 parent f3cbbe901a
commit d98e08f144
16 files changed
+27 -101

No files matched your search

+3 -3
View File
@@ -9,7 +9,7 @@ export default class ComponentsController {
async index({ inertia, auth }: HttpContext) {
const user = await auth.authenticate()
const components = await Component.query().preload('type').where('userId', user.id)
return inertia.render('components/index', { components: components.map((c) => c.serialize({ relations: true })) })
return inertia.render('components/index', { components: components.map((c) => c.serialize()) })
}
async create({ inertia }: HttpContext) {
@@ -40,7 +40,7 @@ export default class ComponentsController {
.where('userId', user.id)
.andWhere('id', componentId)
.firstOrFail()
return inertia.render('components/show', { component: component.serialize({ relations: true }) })
return inertia.render('components/show', { component: component.serialize() })
}
async edit({ params, auth, inertia }: HttpContext) {
@@ -53,7 +53,7 @@ export default class ComponentsController {
.andWhere('id', componentId)
.firstOrFail()
return inertia.render('components/edit', {
component: component.serialize({ relations: true }),
component: component.serialize(),
types: types.map((t) => t.serialize()),
})
}