Skip to content

Commit f687926

Browse files
committed
fix: make session service return error upon empty array
1 parent 01d5e0c commit f687926

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/api/src/sessions/sessions.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class SessionsService {
110110
AND: [accessibleQuery(ability, 'read', 'Session'), { groupId }]
111111
}
112112
});
113-
if (!sessionsWithUsers) {
113+
if (sessionsWithUsers.length < 1) {
114114
throw new NotFoundException(`Failed to find users`);
115115
}
116116
return sessionsWithUsers;

0 commit comments

Comments
 (0)