Skip to content

Commit

Permalink
Fixed URLSearchParams constructor call
Browse files Browse the repository at this point in the history
  • Loading branch information
codyebberson committed Jul 25, 2022
1 parent efa9859 commit 750558f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/sample-account-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,12 @@ async function ensureSchedule(medplum: MedplumClient, practitioner: Practitioner
async function ensureSlots(medplum: MedplumClient, schedule: Schedule, slotDate: Date): Promise<void> {
const existingSlots = await medplum.searchResources(
'Slot',
new URLSearchParams({
_summary: 'true',
schedule: getReferenceString(schedule),
start: ['gt' + slotDate.toISOString(), 'lt' + new Date(slotDate.getTime() + 24 * 60 * 60 * 1000).toISOString()],
})
new URLSearchParams([
['_summary', 'true'],
['schedule', getReferenceString(schedule)],
['start', 'gt' + slotDate.toISOString()],
['start', 'lt' + new Date(slotDate.getTime() + 24 * 60 * 60 * 1000).toISOString()],
])
);

if (existingSlots.length > 0) {
Expand Down

0 comments on commit 750558f

Please sign in to comment.