Skip to content

Commit

Permalink
Update api to allow for 0 hours
Browse files Browse the repository at this point in the history
  • Loading branch information
mau11 committed Oct 1, 2024
1 parent cc5b2d9 commit b6e423b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/server/api/campaign.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ export const resolvers = {
const features = getFeatures(campaign);
return features.USE_DYNAMIC_REPLIES ? features.USE_DYNAMIC_REPLIES : false;
},
responseWindow: campaign => campaign.response_window || 48,
responseWindow: campaign => campaign.response_window != null ? campaign.response_window : 48,
organization: async (campaign, _, { loaders }) =>
campaign.organization ||
loaders.organization.load(campaign.organization_id),
Expand Down
5 changes: 3 additions & 2 deletions src/server/api/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -898,8 +898,9 @@ const rootMutations = {
campaign.batch_size ||
Number(getConfig("DEFAULT_BATCHSIZE", organization) || 300),
response_window:
campaign.response_window ||
Number(getConfig("DEFAULT_RESPONSEWINDOW", organization) || 48),
campaign.response_window != null
? campaign.response_window
: Number(getConfig("DEFAULT_RESPONSEWINDOW", organization) || 48),
is_started: false,
is_archived: false,
join_token: uuidv4()
Expand Down

0 comments on commit b6e423b

Please sign in to comment.