fix: Archived documents should not be returned from documents.list
closes #1575
This commit is contained in:
@ -46,7 +46,12 @@ router.post("documents.list", auth(), pagination(), async (ctx) => {
|
||||
|
||||
// always filter by the current team
|
||||
const user = ctx.state.user;
|
||||
let where = { teamId: user.teamId };
|
||||
let where = {
|
||||
teamId: user.teamId,
|
||||
archivedAt: {
|
||||
[Op.eq]: null,
|
||||
},
|
||||
};
|
||||
|
||||
if (template) {
|
||||
where = { ...where, template: true };
|
||||
|
Reference in New Issue
Block a user