room reservation added
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user