Skip to content

Commit 9bc4e2f

Browse files
parse status query param to int (#544)
Co-authored-by: Assem Hafez <[email protected]>
1 parent 0f96962 commit 9bc4e2f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

server/router/routes/workflow-archived-list-handler.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,16 @@ const workflowArchivedListHandler = async ctx => {
3535
} else {
3636
const startTime = moment(query.startTime || NaN);
3737
const endTime = moment(query.endTime || NaN);
38+
const parsedStatus =
39+
query.status && !isNaN(query.status)
40+
? parseInt(query.status)
41+
: query.status;
3842

3943
ctx.assert(startTime.isValid() && endTime.isValid(), 400);
40-
queryString = buildQueryString(startTime, endTime, query);
44+
queryString = buildQueryString(startTime, endTime, {
45+
...query,
46+
status: parsedStatus,
47+
});
4148
}
4249

4350
const archivedWorkflowsResponse = await ctx.cadence.archivedWorkflows({

0 commit comments

Comments
 (0)