mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-20 04:39:20 +00:00
Add: Orderby das filas ao buscar dados do user
This commit is contained in:
@@ -7,9 +7,9 @@ const ShowUserService = async (id: string | number): Promise<User> => {
|
|||||||
attributes: ["name", "id", "email", "profile", "tokenVersion"],
|
attributes: ["name", "id", "email", "profile", "tokenVersion"],
|
||||||
include: [
|
include: [
|
||||||
{ model: Queue, as: "queues", attributes: ["id", "name", "color"] }
|
{ model: Queue, as: "queues", attributes: ["id", "name", "color"] }
|
||||||
]
|
],
|
||||||
|
order: [ [ { model: Queue, as: "queues"}, 'name', 'asc' ] ]
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!user) {
|
if (!user) {
|
||||||
throw new AppError("ERR_NO_USER_FOUND", 404);
|
throw new AppError("ERR_NO_USER_FOUND", 404);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user