Skip to content

Commit caf14a1

Browse files
committed
fix(users): return all users workspaces if no ids
1 parent c83c288 commit caf14a1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/models/user.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,13 @@ export default class UserModel extends AbstractModel<UserDBScheme> implements Us
370370
public async getWorkspacesIds(ids: (string | ObjectId)[] = []): Promise<string[]> {
371371
const res = [];
372372

373+
if (ids.length === 0) {
374+
return Object.keys(this.workspaces);
375+
}
376+
373377
for (const id of ids) {
374378
const workspaceId = id.toString();
379+
console.log(workspaceId);
375380
const workspace = this.workspaces[workspaceId];
376381

377382
if (workspace && workspace.isPending !== true) {

0 commit comments

Comments
 (0)