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)
}
+2 -2
View File
@@ -10,14 +10,14 @@ export default class UsersController {
* @returns An array of all users.
*/
async getAll() {
const users = await User.all()
return users
return await User.all()
}
/**
* Retrieve a single user.
*
* @param request - The HTTP context containing the request data.
* @param response - The HTTP context's response object.
* @returns The user with the specified id.
*/
async getOne({ request, response }: HttpContext) {