Skip to content

Commit

Permalink
Merge pull request #363 from internxt/fix/overlapped-route-changed-an…
Browse files Browse the repository at this point in the history
…d-types

[_] fix: change type in repository and modify route name
  • Loading branch information
apsantiso authored Jul 16, 2024
2 parents 2e336ca + 248acee commit b87275e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/modules/file/file.repository.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('FileRepository', () => {
where: expect.objectContaining({
createdBy: user.uuid,
workspaceId: workspace.id,
created_at: { [Op.gte]: options.createdFrom },
createdAt: { [Op.gte]: options.createdFrom },
}),
}),
}),
Expand Down Expand Up @@ -87,7 +87,7 @@ describe('FileRepository', () => {
expect.objectContaining({
where: expect.objectContaining({
[Op.or]: expect.arrayContaining([{ status: statuses[0] }]),
removed_at: { [Op.gte]: options.removedFrom },
removedAt: { [Op.gte]: options.removedFrom },
}),
}),
);
Expand Down
8 changes: 4 additions & 4 deletions src/modules/file/file.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,16 +326,16 @@ export class SequelizeFileRepository implements FileRepository {
): Promise<{ size: string }[]> {
const statusesFilter = statuses.map((value) => ({ status: value }));

const fileDateFilters: any = {};
const fileDateFilters: WhereOptions<FileModel> = {};
if (options?.removedFrom) {
fileDateFilters.removed_at = {
fileDateFilters.removedAt = {
[Op.gte]: options?.removedFrom,
};
}

const workspaceItemDateFilters: any = {};
const workspaceItemDateFilters: WhereOptions<WorkspaceItemUserModel> = {};
if (options?.createdFrom) {
workspaceItemDateFilters.created_at = {
workspaceItemDateFilters.createdAt = {
[Op.gte]: options.createdFrom,
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/workspaces/workspaces.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ export class WorkspacesController {
return this.workspaceUseCases.getWorkspaceTeams(user, workspaceId);
}

@Get('/:workspaceId/usage')
@Get('/:workspaceId/usage/member')
@ApiOperation({
summary: 'User usage in drive',
})
Expand Down

0 comments on commit b87275e

Please sign in to comment.