fix: TS errors, serialize calls, unused imports, pre-commit hook
Build & Deploy / build (push) Successful in 32s
Build & Deploy / docker (push) Successful in 1m42s

This commit is contained in:
Kevin
2026-07-07 20:49:52 +02:00
parent 15d3a13d0a
commit c4cad4f875
16 changed files with 27 additions and 101 deletions
+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()),
})
}