Skip to content

Commit

Permalink
Patch actionNames on getWorkspacelogs
Browse files Browse the repository at this point in the history
  • Loading branch information
dangtony98 committed Jan 2, 2023
1 parent 0294431 commit 4af8390
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/src/ee/controllers/v1/workspaceController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ export const getWorkspaceLogs = async (req: Request, res: Response) => {
let logs
try {
const { workspaceId } = req.params;
const { userId, actionNames } = req.query;

const offset: number = parseInt(req.query.offset as string);
const limit: number = parseInt(req.query.limit as string);
const userId: string = req.query.userId as string;
const actionNames: string = req.query.actionNames as string;

logs = await Log.find({
workspace: workspaceId,
Expand All @@ -53,7 +54,7 @@ export const getWorkspaceLogs = async (req: Request, res: Response) => {
actionNames
? {
actionNames: {
$in: actionNames
$in: actionNames.split(',')
}
} : {}
)
Expand Down

0 comments on commit 4af8390

Please sign in to comment.