room reservation added

This commit is contained in:
Kiss Dávid
2026-04-01 12:12:46 +02:00
parent d55e085741
commit 821ec88882
6 changed files with 145 additions and 9 deletions
+2 -4
View File
@@ -10,8 +10,7 @@ export default class CategoriesController {
* @returns An array of all categories.
*/
async getAll() {
const categories = await Category.all()
return categories
return await Category.all()
}
/**
@@ -23,8 +22,7 @@ export default class CategoriesController {
async getOne({ request }: HttpContext) {
try {
const id = request.body().id
const category = await Category.find(id)
return category
return await Category.find(id)
} catch (error) {
logger.error('Category retrieval failed: %s', error)
}