fix: stats does not account for permission
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 5s
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 5s
This commit is contained in:
parent
163f07758e
commit
126e00baf1
1 changed files with 2 additions and 1 deletions
|
|
@ -70,8 +70,9 @@ const permissionCheckCompany = createPermCheck((_) => true);
|
|||
@Tags("Task Order")
|
||||
export class TaskController extends Controller {
|
||||
@Get("stats")
|
||||
async getTaskOrderStats() {
|
||||
async getTaskOrderStats(@Request() req: RequestWithUser) {
|
||||
const task = await prisma.taskOrder.groupBy({
|
||||
where: { registeredBranch: { OR: permissionCondCompany(req.user) } },
|
||||
by: ["taskOrderStatus"],
|
||||
_count: true,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue