public
imalexnord
read
Slot
Calendar-first scheduling powered by Cloudflare Workers and Google Calendar.
Languages
Repository composition by tracked source files.
TypeScript
79%
CSS
19%
SQL
2%
HTML
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/user/imalexnord/slot.git
ssh://[email protected]:2222/user/imalexnord/slot.git
Trace
worker/index.ts
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
index.ts
on main
Author
Date
Commit
Line
Code
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1
import {
import {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2
clearSessionCookie,
clearSessionCookie,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 3
getCookie,
getCookie,
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 4
randomUrlToken,
randomUrlToken,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 5
sessionCookie,
sessionCookie,
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 6
sha256Base64Url,
sha256Base64Url,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 7
signSession,
signSession,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 8
verifySession,
verifySession,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 9
} from './crypto';
} from './crypto';
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 10
import {
import {
Alex Nord
3 days ago
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 11
GoogleCalendarError,
GoogleCalendarError,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 12
completeGoogleOAuth,
completeGoogleOAuth,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 13
confirmCalendarHold,
confirmCalendarHold,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 14
createCalendarEvent,
createCalendarEvent,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 15
createCalendarHold,
createCalendarHold,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 16
createGoogleAuthUrl,
createGoogleAuthUrl,
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 17
deleteCalendarEvent,
deleteCalendarEvent,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 18
disconnectGoogle,
disconnectGoogle,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 19
hasGoogleConnection,
hasGoogleConnection,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 20
queryBusy,
queryBusy,
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 21
rescheduleCalendarEvent,
rescheduleCalendarEvent,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 22
sendRescheduleSuggestion,
sendRescheduleSuggestion,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 23
} from './google';
} from './google';
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 24
import { bookingAmountMinor } from './money';
import { bookingAmountMinor } from './money';
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 25
import { DEFAULT_SETTINGS, getSettings, saveSettings } from './settings';
import { DEFAULT_SETTINGS, getSettings, saveSettings } from './settings';
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 26
import {
import {
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 27
createStripeCheckoutSession,
createStripeCheckoutSession,
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 28
createStripeRefund,
createStripeRefund,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 29
expireStripeCheckoutSession,
expireStripeCheckoutSession,
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 30
retrieveStripeCheckoutSession,
retrieveStripeCheckoutSession,
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 31
stripeCheckoutSessionMode,
stripeCheckoutSessionMode,
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 32
stripeConfigured,
stripeConfigured,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 33
stripeMode,
stripeMode,
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 34
stripePaymentIntentId,
stripePaymentIntentId,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 35
stripeReceiptUrl,
stripeReceiptUrl,
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 36
StripeError,
StripeError,
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 37
verifyStripeWebhook,
verifyStripeWebhook,
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 38
} from './stripe';
} from './stripe';
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 39
import type { StripeCheckoutSession, StripeRefund } from './stripe';
import type { StripeCheckoutSession, StripeRefund } from './stripe';
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 40
import {
import {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 41
addDaysToDateKey,
addDaysToDateKey,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 42
addMinutes,
addMinutes,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 43
dateKeyInZone,
dateKeyInZone,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 44
overlaps,
overlaps,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 45
slotKeys,
slotKeys,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 46
timeToMinutes,
timeToMinutes,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 47
weekdayForDate,
weekdayForDate,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 48
zonedDateTimeToUtc,
zonedDateTimeToUtc,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 49
} from './time';
} from './time';
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 50
import type {
import type {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 51
AppSettings,
AppSettings,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 52
AvailabilityBlock,
AvailabilityBlock,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 53
BookingRequest,
BookingRequest,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 54
BusyRange,
BusyRange,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 55
Env,
Env,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 56
MeetingMode,
MeetingMode,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 57
RecurringUnavailablePeriod,
RecurringUnavailablePeriod,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 58
} from './types';
} from './types';
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 59
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 60
const JSON_HEADERS = {
const JSON_HEADERS = {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 61
'Content-Type': 'application/json; charset=utf-8',
'Content-Type': 'application/json; charset=utf-8',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 62
'Cache-Control': 'no-store',
'Cache-Control': 'no-store',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 63
};
};
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 64
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 65
function json(data: unknown, status = 200, headers: HeadersInit = {}): Response {
function json(data: unknown, status = 200, headers: HeadersInit = {}): Response {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 66
return new Response(JSON.stringify(data), {
return new Response(JSON.stringify(data), {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 67
status,
status,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 68
headers: { ...JSON_HEADERS, ...headers },
headers: { ...JSON_HEADERS, ...headers },
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 69
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 70
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 71
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 72
function redirect(location: string, headers: HeadersInit = {}): Response {
function redirect(location: string, headers: HeadersInit = {}): Response {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 73
return new Response(null, { status: 302, headers: { Location: location, ...headers } });
return new Response(null, { status: 302, headers: { Location: location, ...headers } });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 74
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 75
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 76
function errorMessage(error: unknown): string {
function errorMessage(error: unknown): string {
Alex Nord
3 days ago
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 77
if (error instanceof GoogleCalendarError) return error.publicMessage;
if (error instanceof GoogleCalendarError) return error.publicMessage;
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 78
return error instanceof Error ? error.message : 'Unexpected error';
return error instanceof Error ? error.message : 'Unexpected error';
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 79
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 80
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 81
function isEmail(value: string): boolean {
function isEmail(value: string): boolean {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 82
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value);
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 83
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 84
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 85
function isTime(value: string): boolean {
function isTime(value: string): boolean {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 86
return /^\d{2}:\d{2}$/.test(value) && timeToMinutes(value) >= 0 && timeToMinutes(value) <= 24 * 60;
return /^\d{2}:\d{2}$/.test(value) && timeToMinutes(value) >= 0 && timeToMinutes(value) <= 24 * 60;
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 87
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 88
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 89
function privateCalendarError(error: unknown): string {
function privateCalendarError(error: unknown): string {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 90
if (error instanceof GoogleCalendarError) return error.publicMessage;
if (error instanceof GoogleCalendarError) return error.publicMessage;
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 91
return 'Calendar sync failed. Check the calendar connection and try again.';
return 'Calendar sync failed. Check the calendar connection and try again.';
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 92
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 93
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 94
async function enforceBookingRateLimit(request: Request, env: Env): Promise<boolean> {
async function enforceBookingRateLimit(request: Request, env: Env): Promise<boolean> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 95
const ip = request.headers.get('CF-Connecting-IP');
const ip = request.headers.get('CF-Connecting-IP');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 96
if (!ip) return true; // Local development.
if (!ip) return true; // Local development.
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 97
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 98
const hourBucket = Math.floor(Date.now() / 3_600_000);
const hourBucket = Math.floor(Date.now() / 3_600_000);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 99
const material = new TextEncoder().encode(`${ip}:${hourBucket}:${env.SESSION_SECRET}`);
const material = new TextEncoder().encode(`${ip}:${hourBucket}:${env.SESSION_SECRET}`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 100
const digest = new Uint8Array(await crypto.subtle.digest('SHA-256', material));
const digest = new Uint8Array(await crypto.subtle.digest('SHA-256', material));
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 101
const key = Array.from(digest, (byte) => byte.toString(16).padStart(2, '0')).join('');
const key = Array.from(digest, (byte) => byte.toString(16).padStart(2, '0')).join('');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 102
const resetAt = (hourBucket + 1) * 3_600_000;
const resetAt = (hourBucket + 1) * 3_600_000;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 103
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 104
await env.DB.prepare('DELETE FROM rate_limits WHERE reset_at < ?1').bind(Date.now()).run();
await env.DB.prepare('DELETE FROM rate_limits WHERE reset_at < ?1').bind(Date.now()).run();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 105
await env.DB.prepare(`
await env.DB.prepare(`
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 106
INSERT INTO rate_limits (key, count, reset_at)
INSERT INTO rate_limits (key, count, reset_at)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 107
VALUES (?1, 1, ?2)
VALUES (?1, 1, ?2)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 108
ON CONFLICT(key) DO UPDATE SET count = count + 1
ON CONFLICT(key) DO UPDATE SET count = count + 1
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 109
`).bind(key, resetAt).run();
`).bind(key, resetAt).run();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 110
const row = await env.DB.prepare('SELECT count FROM rate_limits WHERE key = ?1')
const row = await env.DB.prepare('SELECT count FROM rate_limits WHERE key = ?1')
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 111
.bind(key)
.bind(key)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 112
.first<{ count: number }>();
.first<{ count: number }>();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 113
return (row?.count ?? 1) <= 12;
return (row?.count ?? 1) <= 12;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 114
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 115
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 116
async function enforceCancellationRateLimit(request: Request, env: Env): Promise<boolean> {
async function enforceCancellationRateLimit(request: Request, env: Env): Promise<boolean> {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 117
const ip = request.headers.get('CF-Connecting-IP');
const ip = request.headers.get('CF-Connecting-IP');
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 118
if (!ip) return true;
if (!ip) return true;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 119
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 120
const hourBucket = Math.floor(Date.now() / 3_600_000);
const hourBucket = Math.floor(Date.now() / 3_600_000);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 121
const material = new TextEncoder().encode(`cancel:${ip}:${hourBucket}:${env.SESSION_SECRET}`);
const material = new TextEncoder().encode(`cancel:${ip}:${hourBucket}:${env.SESSION_SECRET}`);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 122
const digest = new Uint8Array(await crypto.subtle.digest('SHA-256', material));
const digest = new Uint8Array(await crypto.subtle.digest('SHA-256', material));
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 123
const key = Array.from(digest, (byte) => byte.toString(16).padStart(2, '0')).join('');
const key = Array.from(digest, (byte) => byte.toString(16).padStart(2, '0')).join('');
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 124
const resetAt = (hourBucket + 1) * 3_600_000;
const resetAt = (hourBucket + 1) * 3_600_000;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 125
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 126
await env.DB.prepare('DELETE FROM rate_limits WHERE reset_at < ?1').bind(Date.now()).run();
await env.DB.prepare('DELETE FROM rate_limits WHERE reset_at < ?1').bind(Date.now()).run();
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 127
await env.DB.prepare(`
await env.DB.prepare(`
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 128
INSERT INTO rate_limits (key, count, reset_at)
INSERT INTO rate_limits (key, count, reset_at)
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 129
VALUES (?1, 1, ?2)
VALUES (?1, 1, ?2)
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 130
ON CONFLICT(key) DO UPDATE SET count = count + 1
ON CONFLICT(key) DO UPDATE SET count = count + 1
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 131
`).bind(key, resetAt).run();
`).bind(key, resetAt).run();
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 132
const row = await env.DB.prepare('SELECT count FROM rate_limits WHERE key = ?1')
const row = await env.DB.prepare('SELECT count FROM rate_limits WHERE key = ?1')
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 133
.bind(key)
.bind(key)
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 134
.first<{ count: number }>();
.first<{ count: number }>();
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 135
return (row?.count ?? 1) <= 10;
return (row?.count ?? 1) <= 10;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 136
}
}
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 137
Alex Nord
about 16 hours ago
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 138
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 139
async function enforceManageRateLimit(request: Request, env: Env): Promise<boolean> {
async function enforceManageRateLimit(request: Request, env: Env): Promise<boolean> {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 140
const ip = request.headers.get('CF-Connecting-IP');
const ip = request.headers.get('CF-Connecting-IP');
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 141
if (!ip) return true;
if (!ip) return true;
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 142
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 143
const hourBucket = Math.floor(Date.now() / 3_600_000);
const hourBucket = Math.floor(Date.now() / 3_600_000);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 144
const material = new TextEncoder().encode(`manage:${ip}:${hourBucket}:${env.SESSION_SECRET}`);
const material = new TextEncoder().encode(`manage:${ip}:${hourBucket}:${env.SESSION_SECRET}`);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 145
const digest = new Uint8Array(await crypto.subtle.digest('SHA-256', material));
const digest = new Uint8Array(await crypto.subtle.digest('SHA-256', material));
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 146
const key = Array.from(digest, (byte) => byte.toString(16).padStart(2, '0')).join('');
const key = Array.from(digest, (byte) => byte.toString(16).padStart(2, '0')).join('');
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 147
const resetAt = (hourBucket + 1) * 3_600_000;
const resetAt = (hourBucket + 1) * 3_600_000;
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 148
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 149
await env.DB.prepare('DELETE FROM rate_limits WHERE reset_at < ?1').bind(Date.now()).run();
await env.DB.prepare('DELETE FROM rate_limits WHERE reset_at < ?1').bind(Date.now()).run();
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 150
await env.DB.prepare(`
await env.DB.prepare(`
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 151
INSERT INTO rate_limits (key, count, reset_at)
INSERT INTO rate_limits (key, count, reset_at)
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 152
VALUES (?1, 1, ?2)
VALUES (?1, 1, ?2)
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 153
ON CONFLICT(key) DO UPDATE SET count = count + 1
ON CONFLICT(key) DO UPDATE SET count = count + 1
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 154
`).bind(key, resetAt).run();
`).bind(key, resetAt).run();
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 155
const row = await env.DB.prepare('SELECT count FROM rate_limits WHERE key = ?1')
const row = await env.DB.prepare('SELECT count FROM rate_limits WHERE key = ?1')
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 156
.bind(key)
.bind(key)
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 157
.first<{ count: number }>();
.first<{ count: number }>();
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 158
return (row?.count ?? 1) <= 30;
return (row?.count ?? 1) <= 30;
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 159
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 160
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 161
function newPublicBookingId(): string {
function newPublicBookingId(): string {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 162
const alphabet = '23456789ABCDEFGHJKLMNPQRSTUVWXYZ';
const alphabet = '23456789ABCDEFGHJKLMNPQRSTUVWXYZ';
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 163
const bytes = crypto.getRandomValues(new Uint8Array(20));
const bytes = crypto.getRandomValues(new Uint8Array(20));
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 164
const chars = Array.from(bytes, (byte) => alphabet[byte % alphabet.length]).join('');
const chars = Array.from(bytes, (byte) => alphabet[byte % alphabet.length]).join('');
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 165
return `SLT-${chars.slice(0, 4)}-${chars.slice(4, 8)}-${chars.slice(8, 12)}-${chars.slice(12, 16)}-${chars.slice(16, 20)}`;
return `SLT-${chars.slice(0, 4)}-${chars.slice(4, 8)}-${chars.slice(8, 12)}-${chars.slice(12, 16)}-${chars.slice(16, 20)}`;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 166
}
}
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 167
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 168
function normalizePublicBookingId(value: unknown): string | null {
function normalizePublicBookingId(value: unknown): string | null {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 169
const compact = String(value ?? '').trim().toUpperCase().replace(/[^A-Z0-9]/g, '');
const compact = String(value ?? '').trim().toUpperCase().replace(/[^A-Z0-9]/g, '');
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 170
if (!compact.startsWith('SLT') || compact.length !== 23) return null;
if (!compact.startsWith('SLT') || compact.length !== 23) return null;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 171
const chars = compact.slice(3);
const chars = compact.slice(3);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 172
if (!/^[A-Z0-9]{20}$/.test(chars)) return null;
if (!/^[A-Z0-9]{20}$/.test(chars)) return null;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 173
return `SLT-${chars.slice(0, 4)}-${chars.slice(4, 8)}-${chars.slice(8, 12)}-${chars.slice(12, 16)}-${chars.slice(16, 20)}`;
return `SLT-${chars.slice(0, 4)}-${chars.slice(4, 8)}-${chars.slice(8, 12)}-${chars.slice(12, 16)}-${chars.slice(16, 20)}`;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 174
}
}
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 175
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 176
async function requireAdmin(request: Request, env: Env): Promise<string | null> {
async function requireAdmin(request: Request, env: Env): Promise<string | null> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 177
const email = await verifySession(env, getCookie(request, 'meet_session'));
const email = await verifySession(env, getCookie(request, 'meet_session'));
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 178
if (!email || email.toLowerCase() !== env.ADMIN_EMAIL.toLowerCase()) return null;
if (!email || email.toLowerCase() !== env.ADMIN_EMAIL.toLowerCase()) return null;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 179
return email;
return email;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 180
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 181
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 182
function validateAppSettings(input: unknown): AppSettings {
function validateAppSettings(input: unknown): AppSettings {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 183
if (!input || typeof input !== 'object') throw new Error('Invalid settings payload');
if (!input || typeof input !== 'object') throw new Error('Invalid settings payload');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 184
const raw = input as Partial<AppSettings>;
const raw = input as Partial<AppSettings>;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 185
const allowedModes: MeetingMode[] = ['google_meet', 'phone', 'in_person', 'decide_later'];
const allowedModes: MeetingMode[] = ['google_meet', 'phone', 'in_person', 'decide_later'];
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 186
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 187
const durations = Array.isArray(raw.durations)
const durations = Array.isArray(raw.durations)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 188
? [...new Set(raw.durations.map(Number).filter((value) => value >= 10 && value <= 240))].sort((a, b) => a - b)
? [...new Set(raw.durations.map(Number).filter((value) => value >= 10 && value <= 240))].sort((a, b) => a - b)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 189
: DEFAULT_SETTINGS.durations;
: DEFAULT_SETTINGS.durations;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 190
if (!durations.length) throw new Error('At least one duration is required');
if (!durations.length) throw new Error('At least one duration is required');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 191
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 192
const availability: AppSettings['availability'] = {};
const availability: AppSettings['availability'] = {};
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 193
for (let day = 0; day <= 6; day += 1) {
for (let day = 0; day <= 6; day += 1) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 194
const intervals = raw.availability?.[String(day)] ?? [];
const intervals = raw.availability?.[String(day)] ?? [];
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 195
availability[String(day)] = intervals
availability[String(day)] = intervals
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 196
.filter((interval) => /^\d{2}:\d{2}$/.test(interval.start) && /^\d{2}:\d{2}$/.test(interval.end))
.filter((interval) => /^\d{2}:\d{2}$/.test(interval.start) && /^\d{2}:\d{2}$/.test(interval.end))
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 197
.filter((interval) => timeToMinutes(interval.end) > timeToMinutes(interval.start))
.filter((interval) => timeToMinutes(interval.end) > timeToMinutes(interval.start))
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 198
.sort((a, b) => timeToMinutes(a.start) - timeToMinutes(b.start))
.sort((a, b) => timeToMinutes(a.start) - timeToMinutes(b.start))
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 199
.slice(0, 3);
.slice(0, 3);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 200
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 201
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 202
const allowMeetingModes = Array.isArray(raw.allowMeetingModes)
const allowMeetingModes = Array.isArray(raw.allowMeetingModes)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 203
? raw.allowMeetingModes.filter((mode): mode is MeetingMode => allowedModes.includes(mode as MeetingMode))
? raw.allowMeetingModes.filter((mode): mode is MeetingMode => allowedModes.includes(mode as MeetingMode))
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 204
: DEFAULT_SETTINGS.allowMeetingModes;
: DEFAULT_SETTINGS.allowMeetingModes;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 205
const normalizedModes = allowMeetingModes.length ? allowMeetingModes : ['google_meet'] as MeetingMode[];
const normalizedModes = allowMeetingModes.length ? allowMeetingModes : ['google_meet'] as MeetingMode[];
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 206
const defaultMeetingMode = normalizedModes.includes(raw.defaultMeetingMode as MeetingMode)
const defaultMeetingMode = normalizedModes.includes(raw.defaultMeetingMode as MeetingMode)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 207
? (raw.defaultMeetingMode as MeetingMode)
? (raw.defaultMeetingMode as MeetingMode)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 208
: normalizedModes[0];
: normalizedModes[0];
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 209
const paymentEnabled = Boolean(raw.paymentEnabled);
const paymentEnabled = Boolean(raw.paymentEnabled);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 210
const paymentRatePerMinute = Math.min(
const paymentRatePerMinute = Math.min(
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 211
1_000_000,
1_000_000,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 212
Math.max(0, Math.round(Number(raw.paymentRatePerMinute ?? DEFAULT_SETTINGS.paymentRatePerMinute) * 10000) / 10000),
Math.max(0, Math.round(Number(raw.paymentRatePerMinute ?? DEFAULT_SETTINGS.paymentRatePerMinute) * 10000) / 10000),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 213
);
);
Alex Nord
about 16 hours ago
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 214
const paymentFreeDurations = Array.isArray(raw.paymentFreeDurations)
const paymentFreeDurations = Array.isArray(raw.paymentFreeDurations)
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 215
? [...new Set(raw.paymentFreeDurations.map(Number).filter((value) => durations.includes(value)))].sort((a, b) => a - b)
? [...new Set(raw.paymentFreeDurations.map(Number).filter((value) => durations.includes(value)))].sort((a, b) => a - b)
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 216
: DEFAULT_SETTINGS.paymentFreeDurations;
: DEFAULT_SETTINGS.paymentFreeDurations;
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 217
const hasPaidDuration = durations.some((duration) => !paymentFreeDurations.includes(duration));
const hasPaidDuration = durations.some((duration) => !paymentFreeDurations.includes(duration));
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 218
if (paymentEnabled && hasPaidDuration && paymentRatePerMinute <= 0) {
if (paymentEnabled && hasPaidDuration && paymentRatePerMinute <= 0) {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 219
throw new Error('Set a price per minute greater than zero for paid meeting lengths.');
throw new Error('Set a price per minute greater than zero for paid meeting lengths.');
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 220
}
}
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 221
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 222
return {
return {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 223
title: String(raw.title ?? DEFAULT_SETTINGS.title).trim().slice(0, 100) || DEFAULT_SETTINGS.title,
title: String(raw.title ?? DEFAULT_SETTINGS.title).trim().slice(0, 100) || DEFAULT_SETTINGS.title,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 224
subtitle: String(raw.subtitle ?? DEFAULT_SETTINGS.subtitle).trim().slice(0, 240),
subtitle: String(raw.subtitle ?? DEFAULT_SETTINGS.subtitle).trim().slice(0, 240),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 225
timezone: String(raw.timezone ?? DEFAULT_SETTINGS.timezone).trim() || DEFAULT_SETTINGS.timezone,
timezone: String(raw.timezone ?? DEFAULT_SETTINGS.timezone).trim() || DEFAULT_SETTINGS.timezone,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 226
bookingWindowDays: Math.min(365, Math.max(1, Number(raw.bookingWindowDays ?? DEFAULT_SETTINGS.bookingWindowDays))),
bookingWindowDays: Math.min(365, Math.max(1, Number(raw.bookingWindowDays ?? DEFAULT_SETTINGS.bookingWindowDays))),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 227
minimumNoticeMinutes: Math.min(10080, Math.max(0, Number(raw.minimumNoticeMinutes ?? 120))),
minimumNoticeMinutes: Math.min(10080, Math.max(0, Number(raw.minimumNoticeMinutes ?? 120))),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 228
bufferBeforeMinutes: Math.min(180, Math.max(0, Number(raw.bufferBeforeMinutes ?? 0))),
bufferBeforeMinutes: Math.min(180, Math.max(0, Number(raw.bufferBeforeMinutes ?? 0))),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 229
bufferAfterMinutes: Math.min(180, Math.max(0, Number(raw.bufferAfterMinutes ?? 15))),
bufferAfterMinutes: Math.min(180, Math.max(0, Number(raw.bufferAfterMinutes ?? 15))),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 230
slotIncrementMinutes: [5, 10, 15, 20, 30, 60].includes(Number(raw.slotIncrementMinutes))
slotIncrementMinutes: [5, 10, 15, 20, 30, 60].includes(Number(raw.slotIncrementMinutes))
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 231
? Number(raw.slotIncrementMinutes)
? Number(raw.slotIncrementMinutes)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 232
: 15,
: 15,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 233
durations,
durations,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 234
calendarId: String(raw.calendarId ?? 'primary').trim() || 'primary',
calendarId: String(raw.calendarId ?? 'primary').trim() || 'primary',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 235
busyCalendarIds: Array.isArray(raw.busyCalendarIds)
busyCalendarIds: Array.isArray(raw.busyCalendarIds)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 236
? raw.busyCalendarIds.map(String).map((value) => value.trim()).filter(Boolean).slice(0, 20)
? raw.busyCalendarIds.map(String).map((value) => value.trim()).filter(Boolean).slice(0, 20)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 237
: ['primary'],
: ['primary'],
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 238
defaultMeetingMode,
defaultMeetingMode,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 239
allowMeetingModes: normalizedModes,
allowMeetingModes: normalizedModes,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 240
inPersonLocation: String(raw.inPersonLocation ?? '').trim().slice(0, 240),
inPersonLocation: String(raw.inPersonLocation ?? '').trim().slice(0, 240),
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 241
paymentEnabled,
paymentEnabled,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 242
paymentRatePerMinute,
paymentRatePerMinute,
Alex Nord
about 16 hours ago
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 243
paymentFreeDurations,
paymentFreeDurations,
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 244
paymentCurrency: /^[a-zA-Z]{3}$/.test(String(raw.paymentCurrency ?? ''))
paymentCurrency: /^[a-zA-Z]{3}$/.test(String(raw.paymentCurrency ?? ''))
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 245
? String(raw.paymentCurrency).toLowerCase()
? String(raw.paymentCurrency).toLowerCase()
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 246
: DEFAULT_SETTINGS.paymentCurrency,
: DEFAULT_SETTINGS.paymentCurrency,
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 247
paymentLabel: String(raw.paymentLabel ?? DEFAULT_SETTINGS.paymentLabel).trim().slice(0, 120)
paymentLabel: String(raw.paymentLabel ?? DEFAULT_SETTINGS.paymentLabel).trim().slice(0, 120)
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 248
|| DEFAULT_SETTINGS.paymentLabel,
|| DEFAULT_SETTINGS.paymentLabel,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 249
availability,
availability,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 250
};
};
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 251
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 252
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 253
async function d1BusyRanges(env: Env, start: number, end: number): Promise<BusyRange[]> {
async function d1BusyRanges(env: Env, start: number, end: number): Promise<BusyRange[]> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 254
await env.DB.prepare("DELETE FROM slot_locks WHERE expires_at < ?1").bind(Date.now()).run();
await env.DB.prepare("DELETE FROM slot_locks WHERE expires_at < ?1").bind(Date.now()).run();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 255
const result = await env.DB.prepare(`
const result = await env.DB.prepare(`
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 256
SELECT start_time, end_time
SELECT start_time, end_time
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 257
FROM bookings
FROM bookings
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 258
WHERE (
WHERE (
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 259
status = 'pending'
status = 'pending'
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 260
OR status = 'confirmed'
OR status = 'confirmed'
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 261
)
)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 262
AND start_time < ?1
AND start_time < ?1
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 263
AND end_time > ?2
AND end_time > ?2
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 264
`).bind(new Date(end).toISOString(), new Date(start).toISOString()).all<{
`).bind(new Date(end).toISOString(), new Date(start).toISOString()).all<{
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 265
start_time: string;
start_time: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 266
end_time: string;
end_time: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 267
}>();
}>();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 268
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 269
return (result.results ?? []).map((row) => ({
return (result.results ?? []).map((row) => ({
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 270
start: Date.parse(row.start_time),
start: Date.parse(row.start_time),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 271
end: Date.parse(row.end_time),
end: Date.parse(row.end_time),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 272
}));
}));
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 273
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 274
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 275
async function recurringUnavailableForDay(env: Env, weekday: number): Promise<RecurringUnavailablePeriod[]> {
async function recurringUnavailableForDay(env: Env, weekday: number): Promise<RecurringUnavailablePeriod[]> {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 276
const result = await env.DB.prepare(`
const result = await env.DB.prepare(`
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 277
SELECT id, weekdays, start_time, end_time, label
SELECT id, weekdays, start_time, end_time, label
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 278
FROM recurring_unavailable_periods
FROM recurring_unavailable_periods
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 279
ORDER BY start_time
ORDER BY start_time
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 280
`).all<{ id: string; weekdays: string; start_time: string; end_time: string; label: string | null }>();
`).all<{ id: string; weekdays: string; start_time: string; end_time: string; label: string | null }>();
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 281
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 282
return (result.results ?? [])
return (result.results ?? [])
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 283
.map((row) => ({
.map((row) => ({
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 284
id: row.id,
id: row.id,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 285
weekdays: row.weekdays.split(',').map(Number).filter((day) => day >= 0 && day <= 6),
weekdays: row.weekdays.split(',').map(Number).filter((day) => day >= 0 && day <= 6),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 286
start: row.start_time,
start: row.start_time,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 287
end: row.end_time,
end: row.end_time,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 288
label: row.label ?? undefined,
label: row.label ?? undefined,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 289
}))
}))
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 290
.filter((period) => period.weekdays.includes(weekday));
.filter((period) => period.weekdays.includes(weekday));
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 291
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 292
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 293
async function oneOffBlocksForDate(env: Env, dateKey: string): Promise<AvailabilityBlock[]> {
async function oneOffBlocksForDate(env: Env, dateKey: string): Promise<AvailabilityBlock[]> {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 294
const result = await env.DB.prepare(`
const result = await env.DB.prepare(`
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 295
SELECT id, date, start_time, end_time, all_day, label
SELECT id, date, start_time, end_time, all_day, label
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 296
FROM availability_blocks
FROM availability_blocks
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 297
WHERE date = ?1
WHERE date = ?1
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 298
ORDER BY all_day DESC, start_time
ORDER BY all_day DESC, start_time
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 299
`).bind(dateKey).all<{
`).bind(dateKey).all<{
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 300
id: string;
id: string;
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 301
date: string;
date: string;
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 302
start_time: string | null;
start_time: string | null;
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 303
end_time: string | null;
end_time: string | null;
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 304
all_day: number;
all_day: number;
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 305
label: string | null;
label: string | null;
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 306
}>();
}>();
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 307
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 308
return (result.results ?? []).map((row) => ({
return (result.results ?? []).map((row) => ({
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 309
id: row.id,
id: row.id,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 310
date: row.date,
date: row.date,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 311
start: row.start_time ?? undefined,
start: row.start_time ?? undefined,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 312
end: row.end_time ?? undefined,
end: row.end_time ?? undefined,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 313
allDay: row.all_day === 1,
allDay: row.all_day === 1,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 314
label: row.label ?? undefined,
label: row.label ?? undefined,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 315
}));
}));
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 316
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 317
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 318
async function slotUnavailableRanges(env: Env, dateKey: string, timezone: string): Promise<BusyRange[]> {
async function slotUnavailableRanges(env: Env, dateKey: string, timezone: string): Promise<BusyRange[]> {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 319
const weekday = weekdayForDate(dateKey, timezone);
const weekday = weekdayForDate(dateKey, timezone);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 320
const [recurring, oneOff] = await Promise.all([
const [recurring, oneOff] = await Promise.all([
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 321
recurringUnavailableForDay(env, weekday),
recurringUnavailableForDay(env, weekday),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 322
oneOffBlocksForDate(env, dateKey),
oneOffBlocksForDate(env, dateKey),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 323
]);
]);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 324
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 325
const ranges: BusyRange[] = [];
const ranges: BusyRange[] = [];
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 326
for (const period of recurring) {
for (const period of recurring) {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 327
ranges.push({
ranges.push({
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 328
start: zonedDateTimeToUtc(dateKey, period.start, timezone).getTime(),
start: zonedDateTimeToUtc(dateKey, period.start, timezone).getTime(),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 329
end: zonedDateTimeToUtc(dateKey, period.end, timezone).getTime(),
end: zonedDateTimeToUtc(dateKey, period.end, timezone).getTime(),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 330
});
});
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 331
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 332
for (const block of oneOff) {
for (const block of oneOff) {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 333
if (block.allDay) {
if (block.allDay) {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 334
ranges.push({
ranges.push({
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 335
start: zonedDateTimeToUtc(dateKey, '00:00', timezone).getTime(),
start: zonedDateTimeToUtc(dateKey, '00:00', timezone).getTime(),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 336
end: zonedDateTimeToUtc(addDaysToDateKey(dateKey, 1), '00:00', timezone).getTime(),
end: zonedDateTimeToUtc(addDaysToDateKey(dateKey, 1), '00:00', timezone).getTime(),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 337
});
});
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 338
} else if (block.start && block.end) {
} else if (block.start && block.end) {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 339
ranges.push({
ranges.push({
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 340
start: zonedDateTimeToUtc(dateKey, block.start, timezone).getTime(),
start: zonedDateTimeToUtc(dateKey, block.start, timezone).getTime(),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 341
end: zonedDateTimeToUtc(dateKey, block.end, timezone).getTime(),
end: zonedDateTimeToUtc(dateKey, block.end, timezone).getTime(),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 342
});
});
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 343
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 344
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 345
return ranges;
return ranges;
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 346
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 347
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 348
type DurationBlockReason = 'outside_hours' | 'unavailable';
type DurationBlockReason = 'outside_hours' | 'unavailable';
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 349
type AvailabilitySlot = {
type AvailabilitySlot = {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 350
start: string;
start: string;
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 351
time: string;
time: string;
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 352
durations: number[];
durations: number[];
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 353
blockedDurations: Record<string, DurationBlockReason>;
blockedDurations: Record<string, DurationBlockReason>;
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 354
};
};
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 355
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 356
async function computeAvailability(env: Env, dateKey: string) {
async function computeAvailability(env: Env, dateKey: string) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 357
const settings = await getSettings(env);
const settings = await getSettings(env);
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 358
await cleanupStalePendingBookings(env, settings);
await cleanupStalePendingBookings(env, settings);
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 359
const connected = await hasGoogleConnection(env);
const connected = await hasGoogleConnection(env);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 360
if (!connected) {
if (!connected) {
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 361
return { settings, connected, date: dateKey, slots: [] as AvailabilitySlot[] };
return { settings, connected, date: dateKey, slots: [] as AvailabilitySlot[] };
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 362
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 363
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 364
if (!/^\d{4}-\d{2}-\d{2}$/.test(dateKey)) throw new Error('Invalid date');
if (!/^\d{4}-\d{2}-\d{2}$/.test(dateKey)) throw new Error('Invalid date');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 365
const today = dateKeyInZone(new Date(), settings.timezone);
const today = dateKeyInZone(new Date(), settings.timezone);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 366
const maxDate = addDaysToDateKey(today, settings.bookingWindowDays);
const maxDate = addDaysToDateKey(today, settings.bookingWindowDays);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 367
if (dateKey < today || dateKey > maxDate) {
if (dateKey < today || dateKey > maxDate) {
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 368
return { settings, connected, date: dateKey, slots: [] as AvailabilitySlot[] };
return { settings, connected, date: dateKey, slots: [] as AvailabilitySlot[] };
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 369
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 370
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 371
const day = weekdayForDate(dateKey, settings.timezone);
const day = weekdayForDate(dateKey, settings.timezone);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 372
const intervals = settings.availability[String(day)] ?? [];
const intervals = settings.availability[String(day)] ?? [];
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 373
if (!intervals.length) {
if (!intervals.length) {
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 374
return { settings, connected, date: dateKey, slots: [] as AvailabilitySlot[] };
return { settings, connected, date: dateKey, slots: [] as AvailabilitySlot[] };
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 375
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 376
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 377
const queryStart = zonedDateTimeToUtc(dateKey, intervals[0].start, settings.timezone).getTime() - 6 * 3600_000;
const queryStart = zonedDateTimeToUtc(dateKey, intervals[0].start, settings.timezone).getTime() - 6 * 3600_000;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 378
const queryEnd = zonedDateTimeToUtc(dateKey, intervals[intervals.length - 1].end, settings.timezone).getTime() + 6 * 3600_000;
const queryEnd = zonedDateTimeToUtc(dateKey, intervals[intervals.length - 1].end, settings.timezone).getTime() + 6 * 3600_000;
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 379
const [googleBusy, storedBusy, slotBusy] = await Promise.all([
const [googleBusy, storedBusy, slotBusy] = await Promise.all([
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 380
queryBusy(env, settings, new Date(queryStart).toISOString(), new Date(queryEnd).toISOString()),
queryBusy(env, settings, new Date(queryStart).toISOString(), new Date(queryEnd).toISOString()),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 381
d1BusyRanges(env, queryStart, queryEnd),
d1BusyRanges(env, queryStart, queryEnd),
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 382
slotUnavailableRanges(env, dateKey, settings.timezone),
slotUnavailableRanges(env, dateKey, settings.timezone),
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 383
]);
]);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 384
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 385
const busy: BusyRange[] = [
const busy: BusyRange[] = [
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 386
...googleBusy.map((range) => ({ start: Date.parse(range.start), end: Date.parse(range.end) })),
...googleBusy.map((range) => ({ start: Date.parse(range.start), end: Date.parse(range.end) })),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 387
...storedBusy,
...storedBusy,
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 388
...slotBusy,
...slotBusy,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 389
];
];
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 390
const earliestAllowed = Date.now() + settings.minimumNoticeMinutes * 60_000;
const earliestAllowed = Date.now() + settings.minimumNoticeMinutes * 60_000;
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 391
const slots: AvailabilitySlot[] = [];
const slots: AvailabilitySlot[] = [];
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 392
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 393
for (const interval of intervals) {
for (const interval of intervals) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 394
const intervalStartMinutes = timeToMinutes(interval.start);
const intervalStartMinutes = timeToMinutes(interval.start);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 395
const intervalEndMinutes = timeToMinutes(interval.end);
const intervalEndMinutes = timeToMinutes(interval.end);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 396
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 397
for (
for (
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 398
let minute = intervalStartMinutes;
let minute = intervalStartMinutes;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 399
minute < intervalEndMinutes;
minute < intervalEndMinutes;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 400
minute += settings.slotIncrementMinutes
minute += settings.slotIncrementMinutes
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 401
) {
) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 402
const hh = String(Math.floor(minute / 60)).padStart(2, '0');
const hh = String(Math.floor(minute / 60)).padStart(2, '0');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 403
const mm = String(minute % 60).padStart(2, '0');
const mm = String(minute % 60).padStart(2, '0');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 404
const time = `${hh}:${mm}`;
const time = `${hh}:${mm}`;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 405
const start = zonedDateTimeToUtc(dateKey, time, settings.timezone).getTime();
const start = zonedDateTimeToUtc(dateKey, time, settings.timezone).getTime();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 406
if (start < earliestAllowed) continue;
if (start < earliestAllowed) continue;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 407
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 408
const blockedDurations: Record<string, DurationBlockReason> = {};
const blockedDurations: Record<string, DurationBlockReason> = {};
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 409
const availableDurations = settings.durations.filter((duration) => {
const availableDurations = settings.durations.filter((duration) => {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 410
const endMinute = minute + duration;
const endMinute = minute + duration;
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 411
if (endMinute > intervalEndMinutes) {
if (endMinute > intervalEndMinutes) {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 412
blockedDurations[String(duration)] = 'outside_hours';
blockedDurations[String(duration)] = 'outside_hours';
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 413
return false;
return false;
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 414
}
}
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 415
const bufferedStart = addMinutes(start, -settings.bufferBeforeMinutes);
const bufferedStart = addMinutes(start, -settings.bufferBeforeMinutes);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 416
const bufferedEnd = addMinutes(start, duration + settings.bufferAfterMinutes);
const bufferedEnd = addMinutes(start, duration + settings.bufferAfterMinutes);
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 417
if (overlaps(bufferedStart, bufferedEnd, busy)) {
if (overlaps(bufferedStart, bufferedEnd, busy)) {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 418
blockedDurations[String(duration)] = 'unavailable';
blockedDurations[String(duration)] = 'unavailable';
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 419
return false;
return false;
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 420
}
}
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 421
return true;
return true;
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 422
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 423
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 424
if (availableDurations.length) {
if (availableDurations.length) {
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 425
slots.push({
slots.push({
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 426
start: new Date(start).toISOString(),
start: new Date(start).toISOString(),
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 427
time,
time,
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 428
durations: availableDurations,
durations: availableDurations,
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 429
blockedDurations,
blockedDurations,
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 430
});
});
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 431
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 432
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 433
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 434
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 435
return { settings, connected, date: dateKey, slots };
return { settings, connected, date: dateKey, slots };
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 436
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 437
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 438
type PaymentBookingRow = {
type PaymentBookingRow = {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 439
id: string;
id: string;
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 440
public_booking_id: string | null;
public_booking_id: string | null;
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 441
name: string;
name: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 442
email: string;
email: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 443
phone: string | null;
phone: string | null;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 444
message: string | null;
message: string | null;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 445
start_time: string;
start_time: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 446
end_time: string;
end_time: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 447
duration_minutes: number;
duration_minutes: number;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 448
timezone: string;
timezone: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 449
meeting_mode: MeetingMode;
meeting_mode: MeetingMode;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 450
status: string;
status: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 451
google_event_id: string | null;
google_event_id: string | null;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 452
meet_url: string | null;
meet_url: string | null;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 453
payment_status: string;
payment_status: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 454
payment_amount: number | null;
payment_amount: number | null;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 455
payment_currency: string | null;
payment_currency: string | null;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 456
stripe_checkout_session_id: string | null;
stripe_checkout_session_id: string | null;
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 457
stripe_payment_intent_id: string | null;
stripe_payment_intent_id: string | null;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 458
paid_at: string | null;
paid_at: string | null;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 459
rescheduled_at: string | null;
rescheduled_at: string | null;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 460
reschedule_count: number;
reschedule_count: number;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 461
proposed_start_time: string | null;
proposed_start_time: string | null;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 462
proposed_end_time: string | null;
proposed_end_time: string | null;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 463
proposed_at: string | null;
proposed_at: string | null;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 464
proposal_status: string | null;
proposal_status: string | null;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 465
proposal_token_hash: string | null;
proposal_token_hash: string | null;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 466
refund_status: string;
refund_status: string;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 467
stripe_refund_id: string | null;
stripe_refund_id: string | null;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 468
refunded_amount: number | null;
refunded_amount: number | null;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 469
refunded_at: string | null;
refunded_at: string | null;
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 470
updated_at: string | null;
updated_at: string | null;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 471
};
};
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 472
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 473
function publicConfirmation(booking: PaymentBookingRow, receiptUrl: string | null = null) {
function publicConfirmation(booking: PaymentBookingRow, receiptUrl: string | null = null) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 474
return {
return {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 475
id: booking.id,
id: booking.id,
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 476
bookingId: booking.public_booking_id,
bookingId: booking.public_booking_id,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 477
start: booking.start_time,
start: booking.start_time,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 478
end: booking.end_time,
end: booking.end_time,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 479
duration: booking.duration_minutes,
duration: booking.duration_minutes,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 480
timezone: booking.timezone,
timezone: booking.timezone,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 481
meetingMode: booking.meeting_mode,
meetingMode: booking.meeting_mode,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 482
meetUrl: booking.meet_url,
meetUrl: booking.meet_url,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 483
receiptUrl,
receiptUrl,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 484
};
};
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 485
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 486
Alex Nord
about 16 hours ago
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 487
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 488
function publicManagePayload(booking: PaymentBookingRow) {
function publicManagePayload(booking: PaymentBookingRow) {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 489
const future = Date.parse(booking.end_time) > Date.now();
const future = Date.parse(booking.end_time) > Date.now();
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 490
const confirmed = booking.status === 'confirmed';
const confirmed = booking.status === 'confirmed';
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 491
return {
return {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 492
bookingId: booking.public_booking_id,
bookingId: booking.public_booking_id,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 493
name: booking.name,
name: booking.name,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 494
start: booking.start_time,
start: booking.start_time,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 495
end: booking.end_time,
end: booking.end_time,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 496
duration: booking.duration_minutes,
duration: booking.duration_minutes,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 497
timezone: booking.timezone,
timezone: booking.timezone,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 498
meetingMode: booking.meeting_mode,
meetingMode: booking.meeting_mode,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 499
status: booking.status,
status: booking.status,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 500
paymentStatus: booking.payment_status,
paymentStatus: booking.payment_status,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 501
refundStatus: booking.refund_status,
refundStatus: booking.refund_status,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 502
canCancel: confirmed && future,
canCancel: confirmed && future,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 503
canReschedule: confirmed && future,
canReschedule: confirmed && future,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 504
};
};
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 505
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 506
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 507
async function bookingByPublicId(env: Env, value: unknown): Promise<PaymentBookingRow | null> {
async function bookingByPublicId(env: Env, value: unknown): Promise<PaymentBookingRow | null> {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 508
const publicBookingId = normalizePublicBookingId(value);
const publicBookingId = normalizePublicBookingId(value);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 509
if (!publicBookingId) return null;
if (!publicBookingId) return null;
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 510
const row = await env.DB.prepare('SELECT id FROM bookings WHERE public_booking_id = ?1')
const row = await env.DB.prepare('SELECT id FROM bookings WHERE public_booking_id = ?1')
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 511
.bind(publicBookingId)
.bind(publicBookingId)
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 512
.first<{ id: string }>();
.first<{ id: string }>();
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 513
return row ? paymentBookingById(env, row.id) : null;
return row ? paymentBookingById(env, row.id) : null;
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 514
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 515
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 516
type ActivityMetadata = Record<string, string | number | boolean | null | undefined>;
type ActivityMetadata = Record<string, string | number | boolean | null | undefined>;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 517
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 518
async function logActivity(
async function logActivity(
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 519
env: Env,
env: Env,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 520
bookingId: string | null,
bookingId: string | null,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 521
type: string,
type: string,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 522
metadata: ActivityMetadata = {},
metadata: ActivityMetadata = {},
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 523
idempotencyKey: string | null = null,
idempotencyKey: string | null = null,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 524
): Promise<void> {
): Promise<void> {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 525
try {
try {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 526
const cleanMetadata = Object.fromEntries(
const cleanMetadata = Object.fromEntries(
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 527
Object.entries(metadata).filter(([, value]) => value !== undefined),
Object.entries(metadata).filter(([, value]) => value !== undefined),
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 528
);
);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 529
await env.DB.prepare(`
await env.DB.prepare(`
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 530
INSERT OR IGNORE INTO activity_events (id, booking_id, type, metadata, idempotency_key)
INSERT OR IGNORE INTO activity_events (id, booking_id, type, metadata, idempotency_key)
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 531
VALUES (?1, ?2, ?3, ?4, ?5)
VALUES (?1, ?2, ?3, ?4, ?5)
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 532
`).bind(
`).bind(
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 533
crypto.randomUUID(),
crypto.randomUUID(),
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 534
bookingId,
bookingId,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 535
type,
type,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 536
Object.keys(cleanMetadata).length ? JSON.stringify(cleanMetadata) : null,
Object.keys(cleanMetadata).length ? JSON.stringify(cleanMetadata) : null,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 537
idempotencyKey,
idempotencyKey,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 538
).run();
).run();
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 539
} catch {
} catch {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 540
// Activity is observational. A missing/new migration or a feed write must
// Activity is observational. A missing/new migration or a feed write must
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 541
// never be allowed to break booking, payment, refund, or calendar flows.
// never be allowed to break booking, payment, refund, or calendar flows.
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 542
}
}
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 543
}
}
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 544
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 545
async function adminActivity(env: Env): Promise<Response> {
async function adminActivity(env: Env): Promise<Response> {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 546
const settings = await getSettings(env);
const settings = await getSettings(env);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 547
await cleanupStalePendingBookings(env, settings);
await cleanupStalePendingBookings(env, settings);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 548
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 549
const stats = await env.DB.prepare(`
const stats = await env.DB.prepare(`
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 550
WITH facts AS (
WITH facts AS (
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 551
SELECT
SELECT
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 552
*,
*,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 553
CASE
CASE
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 554
WHEN status = 'confirmed' THEN 1
WHEN status = 'confirmed' THEN 1
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 555
WHEN status = 'cancelled' AND (payment_status <> 'cancelled' OR paid_at IS NOT NULL) THEN 1
WHEN status = 'cancelled' AND (payment_status <> 'cancelled' OR paid_at IS NOT NULL) THEN 1
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 556
ELSE 0
ELSE 0
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 557
END AS is_booking
END AS is_booking
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 558
FROM bookings
FROM bookings
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 559
)
)
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 560
SELECT
SELECT
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 561
COALESCE(SUM(is_booking), 0) AS total_bookings,
COALESCE(SUM(is_booking), 0) AS total_bookings,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 562
COALESCE(SUM(CASE WHEN status = 'confirmed' AND julianday(end_time) >= julianday('now') THEN 1 ELSE 0 END), 0) AS upcoming,
COALESCE(SUM(CASE WHEN status = 'confirmed' AND julianday(end_time) >= julianday('now') THEN 1 ELSE 0 END), 0) AS upcoming,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 563
COALESCE(SUM(CASE WHEN status = 'confirmed' AND julianday(end_time) < julianday('now') THEN 1 ELSE 0 END), 0) AS completed,
COALESCE(SUM(CASE WHEN status = 'confirmed' AND julianday(end_time) < julianday('now') THEN 1 ELSE 0 END), 0) AS completed,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 564
COALESCE(SUM(CASE WHEN status = 'cancelled' AND is_booking = 1 THEN 1 ELSE 0 END), 0) AS cancelled,
COALESCE(SUM(CASE WHEN status = 'cancelled' AND is_booking = 1 THEN 1 ELSE 0 END), 0) AS cancelled,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 565
COALESCE(SUM(CASE WHEN is_booking = 1 THEN reschedule_count ELSE 0 END), 0) AS reschedules,
COALESCE(SUM(CASE WHEN is_booking = 1 THEN reschedule_count ELSE 0 END), 0) AS reschedules,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 566
COALESCE(SUM(CASE WHEN paid_at IS NOT NULL THEN 1 ELSE 0 END), 0) AS paid_bookings,
COALESCE(SUM(CASE WHEN paid_at IS NOT NULL THEN 1 ELSE 0 END), 0) AS paid_bookings,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 567
COALESCE(ROUND(AVG(CASE WHEN status = 'confirmed' THEN duration_minutes END), 1), 0) AS average_minutes,
COALESCE(ROUND(AVG(CASE WHEN status = 'confirmed' THEN duration_minutes END), 1), 0) AS average_minutes,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 568
COALESCE(SUM(CASE WHEN status = 'pending' THEN 1 ELSE 0 END), 0) AS open_payment_holds
COALESCE(SUM(CASE WHEN status = 'pending' THEN 1 ELSE 0 END), 0) AS open_payment_holds
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 569
FROM facts
FROM facts
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 570
`).first<{
`).first<{
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 571
total_bookings: number;
total_bookings: number;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 572
upcoming: number;
upcoming: number;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 573
completed: number;
completed: number;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 574
cancelled: number;
cancelled: number;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 575
reschedules: number;
reschedules: number;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 576
paid_bookings: number;
paid_bookings: number;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 577
average_minutes: number;
average_minutes: number;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 578
open_payment_holds: number;
open_payment_holds: number;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 579
}>();
}>();
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 580
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 581
const money = await env.DB.prepare(`
const money = await env.DB.prepare(`
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 582
SELECT
SELECT
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 583
lower(payment_currency) AS currency,
lower(payment_currency) AS currency,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 584
COALESCE(SUM(CASE WHEN paid_at IS NOT NULL THEN payment_amount ELSE 0 END), 0) AS revenue,
COALESCE(SUM(CASE WHEN paid_at IS NOT NULL THEN payment_amount ELSE 0 END), 0) AS revenue,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 585
COALESCE(SUM(CASE WHEN refund_status IN ('succeeded', 'pending') THEN refunded_amount ELSE 0 END), 0) AS refunds
COALESCE(SUM(CASE WHEN refund_status IN ('succeeded', 'pending') THEN refunded_amount ELSE 0 END), 0) AS refunds
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 586
FROM bookings
FROM bookings
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 587
WHERE payment_currency IS NOT NULL
WHERE payment_currency IS NOT NULL
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 588
GROUP BY lower(payment_currency)
GROUP BY lower(payment_currency)
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 589
ORDER BY lower(payment_currency)
ORDER BY lower(payment_currency)
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 590
`).all<{ currency: string; revenue: number; refunds: number }>();
`).all<{ currency: string; revenue: number; refunds: number }>();
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 591
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 592
const feed = await env.DB.prepare(`
const feed = await env.DB.prepare(`
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 593
SELECT
SELECT
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 594
a.id,
a.id,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 595
a.booking_id,
a.booking_id,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 596
a.type,
a.type,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 597
a.occurred_at,
a.occurred_at,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 598
a.metadata,
a.metadata,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 599
b.name,
b.name,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 600
b.email,
b.email,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 601
b.start_time,
b.start_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 602
b.end_time,
b.end_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 603
b.duration_minutes,
b.duration_minutes,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 604
b.payment_amount,
b.payment_amount,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 605
b.payment_currency
b.payment_currency
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 606
FROM activity_events a
FROM activity_events a
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 607
LEFT JOIN bookings b ON b.id = a.booking_id
LEFT JOIN bookings b ON b.id = a.booking_id
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 608
ORDER BY datetime(a.occurred_at) DESC, a.rowid DESC
ORDER BY datetime(a.occurred_at) DESC, a.rowid DESC
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 609
LIMIT 100
LIMIT 100
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 610
`).all<{
`).all<{
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 611
id: string;
id: string;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 612
booking_id: string | null;
booking_id: string | null;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 613
type: string;
type: string;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 614
occurred_at: string;
occurred_at: string;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 615
metadata: string | null;
metadata: string | null;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 616
name: string | null;
name: string | null;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 617
email: string | null;
email: string | null;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 618
start_time: string | null;
start_time: string | null;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 619
end_time: string | null;
end_time: string | null;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 620
duration_minutes: number | null;
duration_minutes: number | null;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 621
payment_amount: number | null;
payment_amount: number | null;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 622
payment_currency: string | null;
payment_currency: string | null;
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 623
}>();
}>();
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 624
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 625
return json({
return json({
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 626
paymentsEnabled: settings.paymentEnabled,
paymentsEnabled: settings.paymentEnabled,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 627
stats: stats ?? {
stats: stats ?? {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 628
total_bookings: 0,
total_bookings: 0,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 629
upcoming: 0,
upcoming: 0,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 630
completed: 0,
completed: 0,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 631
cancelled: 0,
cancelled: 0,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 632
reschedules: 0,
reschedules: 0,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 633
paid_bookings: 0,
paid_bookings: 0,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 634
average_minutes: 0,
average_minutes: 0,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 635
open_payment_holds: 0,
open_payment_holds: 0,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 636
},
},
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 637
money: settings.paymentEnabled ? (money.results ?? []).map((row) => ({
money: settings.paymentEnabled ? (money.results ?? []).map((row) => ({
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 638
currency: row.currency,
currency: row.currency,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 639
revenue: Number(row.revenue ?? 0),
revenue: Number(row.revenue ?? 0),
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 640
refunds: Number(row.refunds ?? 0),
refunds: Number(row.refunds ?? 0),
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 641
net: Number(row.revenue ?? 0) - Number(row.refunds ?? 0),
net: Number(row.revenue ?? 0) - Number(row.refunds ?? 0),
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 642
})) : [],
})) : [],
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 643
events: (feed.results ?? []).map((row) => {
events: (feed.results ?? []).map((row) => {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 644
let metadata: Record<string, unknown> = {};
let metadata: Record<string, unknown> = {};
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 645
if (row.metadata) {
if (row.metadata) {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 646
try { metadata = JSON.parse(row.metadata) as Record<string, unknown>; } catch { metadata = {}; }
try { metadata = JSON.parse(row.metadata) as Record<string, unknown>; } catch { metadata = {}; }
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 647
}
}
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 648
return { ...row, metadata };
return { ...row, metadata };
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 649
}),
}),
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 650
});
});
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 651
}
}
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 652
Alex Nord
about 23 hours ago
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 653
async function adminAttendees(env: Env): Promise<Response> {
async function adminAttendees(env: Env): Promise<Response> {
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 654
const settings = await getSettings(env);
const settings = await getSettings(env);
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 655
await cleanupStalePendingBookings(env, settings);
await cleanupStalePendingBookings(env, settings);
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 656
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 657
const result = await env.DB.prepare(`
const result = await env.DB.prepare(`
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 658
WITH facts AS (
WITH facts AS (
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 659
SELECT
SELECT
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 660
lower(trim(email)) AS email_key,
lower(trim(email)) AS email_key,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 661
status,
status,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 662
start_time,
start_time,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 663
end_time,
end_time,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 664
duration_minutes,
duration_minutes,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 665
payment_status,
payment_status,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 666
paid_at,
paid_at,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 667
refund_status,
refund_status,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 668
refunded_at,
refunded_at,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 669
reschedule_count,
reschedule_count,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 670
created_at,
created_at,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 671
CASE
CASE
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 672
WHEN status = 'confirmed' THEN 1
WHEN status = 'confirmed' THEN 1
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 673
WHEN status = 'cancelled' AND (payment_status <> 'cancelled' OR paid_at IS NOT NULL) THEN 1
WHEN status = 'cancelled' AND (payment_status <> 'cancelled' OR paid_at IS NOT NULL) THEN 1
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 674
ELSE 0
ELSE 0
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 675
END AS is_booking
END AS is_booking
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 676
FROM bookings
FROM bookings
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 677
WHERE trim(email) <> ''
WHERE trim(email) <> ''
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 678
)
)
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 679
SELECT
SELECT
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 680
f.email_key,
f.email_key,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 681
(
(
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 682
SELECT b2.email FROM bookings b2
SELECT b2.email FROM bookings b2
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 683
WHERE lower(trim(b2.email)) = f.email_key
WHERE lower(trim(b2.email)) = f.email_key
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 684
AND (b2.status = 'confirmed' OR (b2.status = 'cancelled' AND (b2.payment_status <> 'cancelled' OR b2.paid_at IS NOT NULL)))
AND (b2.status = 'confirmed' OR (b2.status = 'cancelled' AND (b2.payment_status <> 'cancelled' OR b2.paid_at IS NOT NULL)))
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 685
ORDER BY datetime(b2.created_at) DESC, b2.rowid DESC
ORDER BY datetime(b2.created_at) DESC, b2.rowid DESC
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 686
LIMIT 1
LIMIT 1
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 687
) AS email,
) AS email,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 688
(
(
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 689
SELECT b2.name FROM bookings b2
SELECT b2.name FROM bookings b2
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 690
WHERE lower(trim(b2.email)) = f.email_key
WHERE lower(trim(b2.email)) = f.email_key
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 691
AND (b2.status = 'confirmed' OR (b2.status = 'cancelled' AND (b2.payment_status <> 'cancelled' OR b2.paid_at IS NOT NULL)))
AND (b2.status = 'confirmed' OR (b2.status = 'cancelled' AND (b2.payment_status <> 'cancelled' OR b2.paid_at IS NOT NULL)))
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 692
ORDER BY datetime(b2.created_at) DESC, b2.rowid DESC
ORDER BY datetime(b2.created_at) DESC, b2.rowid DESC
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 693
LIMIT 1
LIMIT 1
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 694
) AS name,
) AS name,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 695
COALESCE(SUM(f.is_booking), 0) AS total_bookings,
COALESCE(SUM(f.is_booking), 0) AS total_bookings,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 696
COALESCE(SUM(CASE WHEN f.status = 'confirmed' AND julianday(f.end_time) >= julianday('now') THEN 1 ELSE 0 END), 0) AS upcoming,
COALESCE(SUM(CASE WHEN f.status = 'confirmed' AND julianday(f.end_time) >= julianday('now') THEN 1 ELSE 0 END), 0) AS upcoming,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 697
COALESCE(SUM(CASE WHEN f.status = 'confirmed' AND julianday(f.end_time) < julianday('now') THEN 1 ELSE 0 END), 0) AS completed,
COALESCE(SUM(CASE WHEN f.status = 'confirmed' AND julianday(f.end_time) < julianday('now') THEN 1 ELSE 0 END), 0) AS completed,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 698
COALESCE(SUM(CASE WHEN f.status = 'cancelled' AND f.is_booking = 1 THEN 1 ELSE 0 END), 0) AS cancelled,
COALESCE(SUM(CASE WHEN f.status = 'cancelled' AND f.is_booking = 1 THEN 1 ELSE 0 END), 0) AS cancelled,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 699
COALESCE(SUM(CASE WHEN f.is_booking = 1 THEN f.reschedule_count ELSE 0 END), 0) AS reschedules,
COALESCE(SUM(CASE WHEN f.is_booking = 1 THEN f.reschedule_count ELSE 0 END), 0) AS reschedules,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 700
COALESCE(SUM(CASE WHEN f.is_booking = 1 AND f.paid_at IS NOT NULL THEN 1 ELSE 0 END), 0) AS paid_bookings,
COALESCE(SUM(CASE WHEN f.is_booking = 1 AND f.paid_at IS NOT NULL THEN 1 ELSE 0 END), 0) AS paid_bookings,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 701
COALESCE(SUM(CASE WHEN f.is_booking = 1 AND (f.refunded_at IS NOT NULL OR f.refund_status = 'succeeded') THEN 1 ELSE 0 END), 0) AS refunded_bookings,
COALESCE(SUM(CASE WHEN f.is_booking = 1 AND (f.refunded_at IS NOT NULL OR f.refund_status = 'succeeded') THEN 1 ELSE 0 END), 0) AS refunded_bookings,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 702
COALESCE(SUM(CASE WHEN f.is_booking = 1 THEN f.duration_minutes ELSE 0 END), 0) AS total_minutes,
COALESCE(SUM(CASE WHEN f.is_booking = 1 THEN f.duration_minutes ELSE 0 END), 0) AS total_minutes,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 703
COALESCE(ROUND(AVG(CASE WHEN f.is_booking = 1 THEN f.duration_minutes END), 1), 0) AS average_minutes,
COALESCE(ROUND(AVG(CASE WHEN f.is_booking = 1 THEN f.duration_minutes END), 1), 0) AS average_minutes,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 704
MIN(CASE WHEN f.is_booking = 1 THEN f.created_at END) AS first_booked_at,
MIN(CASE WHEN f.is_booking = 1 THEN f.created_at END) AS first_booked_at,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 705
MAX(CASE WHEN f.is_booking = 1 THEN f.created_at END) AS last_booked_at
MAX(CASE WHEN f.is_booking = 1 THEN f.created_at END) AS last_booked_at
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 706
FROM facts f
FROM facts f
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 707
GROUP BY f.email_key
GROUP BY f.email_key
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 708
HAVING SUM(f.is_booking) > 0
HAVING SUM(f.is_booking) > 0
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 709
ORDER BY MAX(CASE WHEN f.is_booking = 1 THEN datetime(f.created_at) END) DESC
ORDER BY MAX(CASE WHEN f.is_booking = 1 THEN datetime(f.created_at) END) DESC
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 710
LIMIT 500
LIMIT 500
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 711
`).all<{
`).all<{
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 712
email_key: string;
email_key: string;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 713
email: string;
email: string;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 714
name: string;
name: string;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 715
total_bookings: number;
total_bookings: number;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 716
upcoming: number;
upcoming: number;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 717
completed: number;
completed: number;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 718
cancelled: number;
cancelled: number;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 719
reschedules: number;
reschedules: number;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 720
paid_bookings: number;
paid_bookings: number;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 721
refunded_bookings: number;
refunded_bookings: number;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 722
total_minutes: number;
total_minutes: number;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 723
average_minutes: number;
average_minutes: number;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 724
first_booked_at: string | null;
first_booked_at: string | null;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 725
last_booked_at: string | null;
last_booked_at: string | null;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 726
}>();
}>();
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 727
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 728
return json({
return json({
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 729
paymentsEnabled: settings.paymentEnabled,
paymentsEnabled: settings.paymentEnabled,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 730
attendees: (result.results ?? []).map((row) => ({
attendees: (result.results ?? []).map((row) => ({
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 731
email: row.email,
email: row.email,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 732
name: row.name,
name: row.name,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 733
total_bookings: Number(row.total_bookings ?? 0),
total_bookings: Number(row.total_bookings ?? 0),
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 734
upcoming: Number(row.upcoming ?? 0),
upcoming: Number(row.upcoming ?? 0),
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 735
completed: Number(row.completed ?? 0),
completed: Number(row.completed ?? 0),
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 736
cancelled: Number(row.cancelled ?? 0),
cancelled: Number(row.cancelled ?? 0),
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 737
reschedules: Number(row.reschedules ?? 0),
reschedules: Number(row.reschedules ?? 0),
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 738
paid_bookings: Number(row.paid_bookings ?? 0),
paid_bookings: Number(row.paid_bookings ?? 0),
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 739
refunded_bookings: Number(row.refunded_bookings ?? 0),
refunded_bookings: Number(row.refunded_bookings ?? 0),
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 740
total_minutes: Number(row.total_minutes ?? 0),
total_minutes: Number(row.total_minutes ?? 0),
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 741
average_minutes: Number(row.average_minutes ?? 0),
average_minutes: Number(row.average_minutes ?? 0),
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 742
first_booked_at: row.first_booked_at,
first_booked_at: row.first_booked_at,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 743
last_booked_at: row.last_booked_at,
last_booked_at: row.last_booked_at,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 744
})),
})),
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 745
});
});
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 746
}
}
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 747
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 748
async function adminAttendeeBookings(env: Env, email: string): Promise<Response> {
async function adminAttendeeBookings(env: Env, email: string): Promise<Response> {
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 749
const normalizedEmail = email.trim().toLowerCase();
const normalizedEmail = email.trim().toLowerCase();
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 750
if (!normalizedEmail || normalizedEmail.length > 320 || !normalizedEmail.includes('@')) {
if (!normalizedEmail || normalizedEmail.length > 320 || !normalizedEmail.includes('@')) {
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 751
return json({ error: 'Invalid attendee email.' }, 400);
return json({ error: 'Invalid attendee email.' }, 400);
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 752
}
}
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 753
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 754
const result = await env.DB.prepare(`
const result = await env.DB.prepare(`
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 755
SELECT id, public_booking_id, name, email, start_time, end_time, duration_minutes,
SELECT id, public_booking_id, name, email, start_time, end_time, duration_minutes,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 756
meeting_mode, status, meet_url, created_at,
meeting_mode, status, meet_url, created_at,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 757
cancelled_at, calendar_provider, calendar_sync_status,
cancelled_at, calendar_provider, calendar_sync_status,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 758
calendar_sync_error, calendar_sync_updated_at,
calendar_sync_error, calendar_sync_updated_at,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 759
payment_status, payment_amount, payment_currency,
payment_status, payment_amount, payment_currency,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 760
stripe_checkout_session_id, stripe_payment_intent_id, paid_at,
stripe_checkout_session_id, stripe_payment_intent_id, paid_at,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 761
rescheduled_at, reschedule_count, proposed_start_time, proposed_end_time,
rescheduled_at, reschedule_count, proposed_start_time, proposed_end_time,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 762
proposed_at, proposal_status, refund_status, stripe_refund_id,
proposed_at, proposal_status, refund_status, stripe_refund_id,
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 763
refunded_amount, refunded_at
refunded_amount, refunded_at
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 764
FROM bookings
FROM bookings
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 765
WHERE lower(trim(email)) = ?1
WHERE lower(trim(email)) = ?1
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 766
AND (
AND (
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 767
status = 'confirmed'
status = 'confirmed'
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 768
OR (status = 'cancelled' AND (payment_status <> 'cancelled' OR paid_at IS NOT NULL))
OR (status = 'cancelled' AND (payment_status <> 'cancelled' OR paid_at IS NOT NULL))
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 769
)
)
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 770
ORDER BY datetime(created_at) DESC, start_time DESC
ORDER BY datetime(created_at) DESC, start_time DESC
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 771
LIMIT 100
LIMIT 100
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 772
`).bind(normalizedEmail).all();
`).bind(normalizedEmail).all();
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 773
return json({ bookings: result.results ?? [] });
return json({ bookings: result.results ?? [] });
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 774
}
}
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 775
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 776
async function paymentBookingById(env: Env, bookingId: string): Promise<PaymentBookingRow | null> {
async function paymentBookingById(env: Env, bookingId: string): Promise<PaymentBookingRow | null> {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 777
return env.DB.prepare(`
return env.DB.prepare(`
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 778
SELECT id, public_booking_id, name, email, phone, message, start_time, end_time, duration_minutes,
SELECT id, public_booking_id, name, email, phone, message, start_time, end_time, duration_minutes,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 779
timezone, meeting_mode, status, google_event_id, meet_url, payment_status,
timezone, meeting_mode, status, google_event_id, meet_url, payment_status,
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 780
payment_amount, payment_currency, stripe_checkout_session_id, stripe_payment_intent_id, paid_at,
payment_amount, payment_currency, stripe_checkout_session_id, stripe_payment_intent_id, paid_at,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 781
rescheduled_at, reschedule_count, proposed_start_time, proposed_end_time, proposed_at,
rescheduled_at, reschedule_count, proposed_start_time, proposed_end_time, proposed_at,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 782
proposal_status, proposal_token_hash, refund_status, stripe_refund_id, refunded_amount,
proposal_status, proposal_token_hash, refund_status, stripe_refund_id, refunded_amount,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 783
refunded_at, updated_at
refunded_at, updated_at
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 784
FROM bookings
FROM bookings
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 785
WHERE id = ?1
WHERE id = ?1
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 786
`).bind(bookingId).first<PaymentBookingRow>();
`).bind(bookingId).first<PaymentBookingRow>();
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 787
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 788
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 789
async function releasePendingBooking(env: Env, settings: AppSettings, bookingId: string): Promise<void> {
async function releasePendingBooking(env: Env, settings: AppSettings, bookingId: string): Promise<void> {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 790
const booking = await paymentBookingById(env, bookingId);
const booking = await paymentBookingById(env, bookingId);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 791
if (!booking || booking.status !== 'pending') return;
if (!booking || booking.status !== 'pending') return;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 792
if (booking.google_event_id) {
if (booking.google_event_id) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 793
let lastError: unknown = null;
let lastError: unknown = null;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 794
for (let attempt = 0; attempt < 3; attempt += 1) {
for (let attempt = 0; attempt < 3; attempt += 1) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 795
try {
try {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 796
await deleteCalendarEvent(env, settings, booking.google_event_id);
await deleteCalendarEvent(env, settings, booking.google_event_id);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 797
lastError = null;
lastError = null;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 798
break;
break;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 799
} catch (error) {
} catch (error) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 800
lastError = error;
lastError = error;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 801
if (attempt < 2) await new Promise((resolve) => setTimeout(resolve, 150 * (attempt + 1)));
if (attempt < 2) await new Promise((resolve) => setTimeout(resolve, 150 * (attempt + 1)));
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 802
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 803
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 804
if (lastError) throw lastError;
if (lastError) throw lastError;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 805
}
}
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 806
// Keep a cancelled audit row instead of deleting the booking. Besides making
// Keep a cancelled audit row instead of deleting the booking. Besides making
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 807
// released holds visible in Admin history, this preserves the Stripe session id
// released holds visible in Admin history, this preserves the Stripe session id
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 808
// if a stale Checkout from another Stripe mode ever reports back later.
// if a stale Checkout from another Stripe mode ever reports back later.
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 809
await env.DB.batch([
await env.DB.batch([
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 810
env.DB.prepare('DELETE FROM slot_locks WHERE booking_id = ?1').bind(bookingId),
env.DB.prepare('DELETE FROM slot_locks WHERE booking_id = ?1').bind(bookingId),
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 811
env.DB.prepare(`
env.DB.prepare(`
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 812
UPDATE bookings
UPDATE bookings
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 813
SET status = 'cancelled',
SET status = 'cancelled',
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 814
payment_status = CASE WHEN payment_status = 'paid' THEN 'paid' ELSE 'cancelled' END,
payment_status = CASE WHEN payment_status = 'paid' THEN 'paid' ELSE 'cancelled' END,
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 815
google_event_id = NULL,
google_event_id = NULL,
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 816
meet_url = NULL,
meet_url = NULL,
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 817
cancelled_at = COALESCE(cancelled_at, datetime('now')),
cancelled_at = COALESCE(cancelled_at, datetime('now')),
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 818
calendar_sync_status = 'cancelled',
calendar_sync_status = 'cancelled',
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 819
calendar_sync_error = NULL,
calendar_sync_error = NULL,
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 820
calendar_sync_updated_at = datetime('now'),
calendar_sync_updated_at = datetime('now'),
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 821
updated_at = datetime('now')
updated_at = datetime('now')
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 822
WHERE id = ?1 AND status = 'pending'
WHERE id = ?1 AND status = 'pending'
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 823
`).bind(bookingId),
`).bind(bookingId),
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 824
]);
]);
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 825
await logActivity(env, bookingId, 'payment_hold_released', {
await logActivity(env, bookingId, 'payment_hold_released', {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 826
start: booking.start_time,
start: booking.start_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 827
end: booking.end_time,
end: booking.end_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 828
amount: booking.payment_amount,
amount: booking.payment_amount,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 829
currency: booking.payment_currency,
currency: booking.payment_currency,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 830
}, `booking:${bookingId}:hold-released`);
}, `booking:${bookingId}:hold-released`);
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 831
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 832
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 833
async function recordPaidSession(
async function recordPaidSession(
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 834
env: Env,
env: Env,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 835
bookingId: string,
bookingId: string,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 836
session: StripeCheckoutSession,
session: StripeCheckoutSession,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 837
): Promise<void> {
): Promise<void> {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 838
await env.DB.prepare(`
await env.DB.prepare(`
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 839
UPDATE bookings
UPDATE bookings
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 840
SET payment_status = 'paid',
SET payment_status = 'paid',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 841
payment_amount = COALESCE(?1, payment_amount),
payment_amount = COALESCE(?1, payment_amount),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 842
payment_currency = COALESCE(?2, payment_currency),
payment_currency = COALESCE(?2, payment_currency),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 843
stripe_checkout_session_id = COALESCE(stripe_checkout_session_id, ?3),
stripe_checkout_session_id = COALESCE(stripe_checkout_session_id, ?3),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 844
stripe_payment_intent_id = ?4,
stripe_payment_intent_id = ?4,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 845
paid_at = COALESCE(paid_at, datetime('now'))
paid_at = COALESCE(paid_at, datetime('now'))
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 846
WHERE id = ?5
WHERE id = ?5
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 847
AND (stripe_checkout_session_id IS NULL OR stripe_checkout_session_id = ?3)
AND (stripe_checkout_session_id IS NULL OR stripe_checkout_session_id = ?3)
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 848
`).bind(
`).bind(
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 849
session.amount_total ?? null,
session.amount_total ?? null,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 850
session.currency ?? null,
session.currency ?? null,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 851
session.id,
session.id,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 852
stripePaymentIntentId(session),
stripePaymentIntentId(session),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 853
bookingId,
bookingId,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 854
).run();
).run();
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 855
await logActivity(env, bookingId, 'payment_received', {
await logActivity(env, bookingId, 'payment_received', {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 856
amount: session.amount_total ?? null,
amount: session.amount_total ?? null,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 857
currency: session.currency ?? null,
currency: session.currency ?? null,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 858
}, `booking:${bookingId}:paid`);
}, `booking:${bookingId}:paid`);
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 859
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 860
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 861
async function fulfillPaidBooking(env: Env, bookingId: string): Promise<PaymentBookingRow> {
async function fulfillPaidBooking(env: Env, bookingId: string): Promise<PaymentBookingRow> {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 862
let booking = await paymentBookingById(env, bookingId);
let booking = await paymentBookingById(env, bookingId);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 863
if (!booking) throw new Error('Paid booking record was not found.');
if (!booking) throw new Error('Paid booking record was not found.');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 864
if (booking.status === 'confirmed') return booking;
if (booking.status === 'confirmed') return booking;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 865
if (booking.status === 'confirming') {
if (booking.status === 'confirming') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 866
await env.DB.prepare(`
await env.DB.prepare(`
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 867
UPDATE bookings
UPDATE bookings
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 868
SET status = 'pending', updated_at = datetime('now')
SET status = 'pending', updated_at = datetime('now')
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 869
WHERE id = ?1
WHERE id = ?1
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 870
AND status = 'confirming'
AND status = 'confirming'
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 871
AND updated_at < datetime('now', '-2 minutes')
AND updated_at < datetime('now', '-2 minutes')
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 872
`).bind(booking.id).run();
`).bind(booking.id).run();
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 873
booking = await paymentBookingById(env, booking.id);
booking = await paymentBookingById(env, booking.id);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 874
if (booking?.status === 'confirmed') return booking;
if (booking?.status === 'confirmed') return booking;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 875
if (booking?.status === 'confirming') {
if (booking?.status === 'confirming') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 876
throw new Error('Paid booking confirmation is already in progress.');
throw new Error('Paid booking confirmation is already in progress.');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 877
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 878
if (!booking) throw new Error('Paid booking record was not found.');
if (!booking) throw new Error('Paid booking record was not found.');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 879
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 880
if (booking.status !== 'pending' || booking.payment_status !== 'paid') {
if (booking.status !== 'pending' || booking.payment_status !== 'paid') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 881
throw new Error('Booking is not ready for paid confirmation.');
throw new Error('Booking is not ready for paid confirmation.');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 882
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 883
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 884
// Claim fulfillment before touching Google. This keeps the Stripe webhook and
// Claim fulfillment before touching Google. This keeps the Stripe webhook and
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 885
// the browser return-page fallback from both sending the attendee invitation.
// the browser return-page fallback from both sending the attendee invitation.
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 886
const claim = await env.DB.prepare(`
const claim = await env.DB.prepare(`
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 887
UPDATE bookings
UPDATE bookings
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 888
SET status = 'confirming',
SET status = 'confirming',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 889
calendar_sync_status = 'confirming',
calendar_sync_status = 'confirming',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 890
calendar_sync_error = NULL,
calendar_sync_error = NULL,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 891
calendar_sync_updated_at = datetime('now'),
calendar_sync_updated_at = datetime('now'),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 892
updated_at = datetime('now')
updated_at = datetime('now')
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 893
WHERE id = ?1
WHERE id = ?1
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 894
AND status = 'pending'
AND status = 'pending'
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 895
AND payment_status = 'paid'
AND payment_status = 'paid'
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 896
`).bind(booking.id).run();
`).bind(booking.id).run();
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 897
const claimed = ((claim as unknown as { meta?: { changes?: number } }).meta?.changes ?? 0) > 0;
const claimed = ((claim as unknown as { meta?: { changes?: number } }).meta?.changes ?? 0) > 0;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 898
if (!claimed) {
if (!claimed) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 899
booking = await paymentBookingById(env, booking.id);
booking = await paymentBookingById(env, booking.id);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 900
if (booking?.status === 'confirmed') return booking;
if (booking?.status === 'confirmed') return booking;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 901
throw new Error('Paid booking confirmation is already in progress.');
throw new Error('Paid booking confirmation is already in progress.');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 902
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 903
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 904
const settings = await getSettings(env);
const settings = await getSettings(env);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 905
try {
try {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 906
const created = booking.google_event_id
const created = booking.google_event_id
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 907
? await confirmCalendarHold(env, settings, booking.google_event_id, {
? await confirmCalendarHold(env, settings, booking.google_event_id, {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 908
id: booking.id,
id: booking.id,
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 909
publicBookingId: booking.public_booking_id ?? booking.id,
publicBookingId: booking.public_booking_id ?? booking.id,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 910
name: booking.name,
name: booking.name,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 911
email: booking.email,
email: booking.email,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 912
phone: booking.phone ?? undefined,
phone: booking.phone ?? undefined,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 913
message: booking.message ?? undefined,
message: booking.message ?? undefined,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 914
start: booking.start_time,
start: booking.start_time,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 915
end: booking.end_time,
end: booking.end_time,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 916
meetingMode: booking.meeting_mode,
meetingMode: booking.meeting_mode,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 917
})
})
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 918
: await createCalendarEvent(env, settings, {
: await createCalendarEvent(env, settings, {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 919
id: booking.id,
id: booking.id,
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 920
publicBookingId: booking.public_booking_id ?? booking.id,
publicBookingId: booking.public_booking_id ?? booking.id,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 921
name: booking.name,
name: booking.name,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 922
email: booking.email,
email: booking.email,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 923
phone: booking.phone ?? undefined,
phone: booking.phone ?? undefined,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 924
message: booking.message ?? undefined,
message: booking.message ?? undefined,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 925
start: booking.start_time,
start: booking.start_time,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 926
end: booking.end_time,
end: booking.end_time,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 927
meetingMode: booking.meeting_mode,
meetingMode: booking.meeting_mode,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 928
});
});
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 929
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 930
await env.DB.batch([
await env.DB.batch([
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 931
env.DB.prepare(`
env.DB.prepare(`
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 932
UPDATE bookings
UPDATE bookings
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 933
SET status = 'confirmed',
SET status = 'confirmed',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 934
google_event_id = ?1,
google_event_id = ?1,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 935
meet_url = ?2,
meet_url = ?2,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 936
calendar_sync_status = 'synced',
calendar_sync_status = 'synced',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 937
calendar_sync_error = NULL,
calendar_sync_error = NULL,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 938
calendar_sync_updated_at = datetime('now'),
calendar_sync_updated_at = datetime('now'),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 939
updated_at = datetime('now')
updated_at = datetime('now')
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 940
WHERE id = ?3
WHERE id = ?3
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 941
`).bind(created.eventId, created.meetUrl, booking.id),
`).bind(created.eventId, created.meetUrl, booking.id),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 942
env.DB.prepare('UPDATE slot_locks SET expires_at = ?1 WHERE booking_id = ?2')
env.DB.prepare('UPDATE slot_locks SET expires_at = ?1 WHERE booking_id = ?2')
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 943
.bind(Date.now() + 10 * 60_000, booking.id),
.bind(Date.now() + 10 * 60_000, booking.id),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 944
]);
]);
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 945
await logActivity(env, booking.id, 'booking_confirmed', {
await logActivity(env, booking.id, 'booking_confirmed', {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 946
start: booking.start_time,
start: booking.start_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 947
end: booking.end_time,
end: booking.end_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 948
duration: booking.duration_minutes,
duration: booking.duration_minutes,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 949
paid: true,
paid: true,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 950
}, `booking:${booking.id}:confirmed`);
}, `booking:${booking.id}:confirmed`);
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 951
} catch (error) {
} catch (error) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 952
await env.DB.prepare(`
await env.DB.prepare(`
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 953
UPDATE bookings
UPDATE bookings
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 954
SET status = 'pending',
SET status = 'pending',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 955
calendar_sync_status = 'failed',
calendar_sync_status = 'failed',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 956
calendar_sync_error = ?1,
calendar_sync_error = ?1,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 957
calendar_sync_updated_at = datetime('now'),
calendar_sync_updated_at = datetime('now'),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 958
updated_at = datetime('now')
updated_at = datetime('now')
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 959
WHERE id = ?2
WHERE id = ?2
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 960
AND status = 'confirming'
AND status = 'confirming'
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 961
`).bind(privateCalendarError(error), booking.id).run().catch(() => undefined);
`).bind(privateCalendarError(error), booking.id).run().catch(() => undefined);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 962
throw error;
throw error;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 963
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 964
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 965
const confirmed = await paymentBookingById(env, booking.id);
const confirmed = await paymentBookingById(env, booking.id);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 966
if (!confirmed) throw new Error('Confirmed booking record disappeared.');
if (!confirmed) throw new Error('Confirmed booking record disappeared.');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 967
return confirmed;
return confirmed;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 968
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 969
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 970
async function cleanupStalePendingBookings(env: Env, settings: AppSettings): Promise<void> {
async function cleanupStalePendingBookings(env: Env, settings: AppSettings): Promise<void> {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 971
const stale = await env.DB.prepare(`
const stale = await env.DB.prepare(`
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 972
SELECT id, stripe_checkout_session_id
SELECT id, stripe_checkout_session_id
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 973
FROM bookings
FROM bookings
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 974
WHERE status = 'pending'
WHERE status = 'pending'
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 975
AND created_at < datetime('now', '-35 minutes')
AND created_at < datetime('now', '-35 minutes')
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 976
ORDER BY created_at
ORDER BY created_at
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 977
LIMIT 5
LIMIT 5
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 978
`).all<{ id: string; stripe_checkout_session_id: string | null }>();
`).all<{ id: string; stripe_checkout_session_id: string | null }>();
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 979
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 980
for (const row of stale.results ?? []) {
for (const row of stale.results ?? []) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 981
if (row.stripe_checkout_session_id && stripeConfigured(env)) {
if (row.stripe_checkout_session_id && stripeConfigured(env)) {
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 982
const sessionMode = stripeCheckoutSessionMode(row.stripe_checkout_session_id);
const sessionMode = stripeCheckoutSessionMode(row.stripe_checkout_session_id);
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 983
const configuredMode = stripeMode(env);
const configuredMode = stripeMode(env);
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 984
// These rows are already older than 35 minutes and Slot creates Checkout
// These rows are already older than 35 minutes and Slot creates Checkout
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 985
// sessions with a 30-minute expires_at. If the Worker has since switched
// sessions with a 30-minute expires_at. If the Worker has since switched
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 986
// Stripe modes, the current key cannot retrieve the old session, but it is
// Stripe modes, the current key cannot retrieve the old session, but it is
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 987
// safe to release the expired local hold instead of keeping it forever.
// safe to release the expired local hold instead of keeping it forever.
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 988
const modeMismatch = sessionMode !== 'unknown'
const modeMismatch = sessionMode !== 'unknown'
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 989
&& configuredMode !== 'unknown'
&& configuredMode !== 'unknown'
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 990
&& sessionMode !== configuredMode;
&& sessionMode !== configuredMode;
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 991
if (!modeMismatch) {
if (!modeMismatch) {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 992
try {
try {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 993
const session = await retrieveStripeCheckoutSession(env, row.stripe_checkout_session_id);
const session = await retrieveStripeCheckoutSession(env, row.stripe_checkout_session_id);
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 994
if (session.payment_status === 'paid') {
if (session.payment_status === 'paid') {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 995
await recordPaidSession(env, row.id, session);
await recordPaidSession(env, row.id, session);
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 996
await fulfillPaidBooking(env, row.id);
await fulfillPaidBooking(env, row.id);
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 997
continue;
continue;
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 998
}
}
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 999
if (session.status === 'open') continue;
if (session.status === 'open') continue;
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1000
} catch {
} catch {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1001
// Do not destroy a reservation when Stripe cannot be checked safely.
// Do not destroy a reservation when Stripe cannot be checked safely.
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1002
continue;
continue;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1003
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1004
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1005
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1006
await releasePendingBooking(env, settings, row.id).catch(() => undefined);
await releasePendingBooking(env, settings, row.id).catch(() => undefined);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1007
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1008
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1009
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1010
async function createBooking(env: Env, httpRequest: Request, request: BookingRequest): Promise<Response> {
async function createBooking(env: Env, httpRequest: Request, request: BookingRequest): Promise<Response> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1011
if (request.website) return json({ ok: true, message: 'Booked' }); // honeypot
if (request.website) return json({ ok: true, message: 'Booked' }); // honeypot
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1012
if (!(await enforceBookingRateLimit(httpRequest, env))) {
if (!(await enforceBookingRateLimit(httpRequest, env))) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1013
return json({ error: 'Too many booking attempts from this connection. Try again later.' }, 429);
return json({ error: 'Too many booking attempts from this connection. Try again later.' }, 429);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1014
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1015
const name = String(request.name ?? '').trim().slice(0, 120);
const name = String(request.name ?? '').trim().slice(0, 120);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1016
const email = String(request.email ?? '').trim().toLowerCase().slice(0, 254);
const email = String(request.email ?? '').trim().toLowerCase().slice(0, 254);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1017
const phone = String(request.phone ?? '').trim().slice(0, 80);
const phone = String(request.phone ?? '').trim().slice(0, 80);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1018
const message = String(request.message ?? '').trim().slice(0, 2000);
const message = String(request.message ?? '').trim().slice(0, 2000);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1019
const duration = Number(request.duration);
const duration = Number(request.duration);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1020
const startMs = Date.parse(request.start);
const startMs = Date.parse(request.start);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1021
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1022
if (!name || !isEmail(email) || !Number.isFinite(startMs)) {
if (!name || !isEmail(email) || !Number.isFinite(startMs)) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1023
return json({ error: 'Name, a valid email, and a start time are required.' }, 400);
return json({ error: 'Name, a valid email, and a start time are required.' }, 400);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1024
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1025
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1026
const settings = await getSettings(env);
const settings = await getSettings(env);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1027
if (!settings.durations.includes(duration)) return json({ error: 'That duration is not available.' }, 400);
if (!settings.durations.includes(duration)) return json({ error: 'That duration is not available.' }, 400);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1028
if (!settings.allowMeetingModes.includes(request.meetingMode)) {
if (!settings.allowMeetingModes.includes(request.meetingMode)) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1029
return json({ error: 'That meeting type is not available.' }, 400);
return json({ error: 'That meeting type is not available.' }, 400);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1030
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1031
if (request.meetingMode === 'phone' && !phone) {
if (request.meetingMode === 'phone' && !phone) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1032
return json({ error: 'A phone number is required for a phone meeting.' }, 400);
return json({ error: 'A phone number is required for a phone meeting.' }, 400);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1033
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1034
Alex Nord
about 16 hours ago
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1035
const paymentRequired = settings.paymentEnabled && !settings.paymentFreeDurations.includes(duration);
const paymentRequired = settings.paymentEnabled && !settings.paymentFreeDurations.includes(duration);
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1036
if (paymentRequired && settings.paymentRatePerMinute <= 0) {
if (paymentRequired && settings.paymentRatePerMinute <= 0) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1037
return json({ error: 'Payment is required, but the owner has not configured a per-minute price.' }, 503);
return json({ error: 'Payment is required, but the owner has not configured a per-minute price.' }, 503);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1038
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1039
if (paymentRequired && !stripeConfigured(env)) {
if (paymentRequired && !stripeConfigured(env)) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1040
return json({ error: 'Payment is required, but Stripe is not configured. The owner needs to fix the Stripe setup.' }, 503);
return json({ error: 'Payment is required, but Stripe is not configured. The owner needs to fix the Stripe setup.' }, 503);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1041
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1042
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1043
const amountMinor = paymentRequired
const amountMinor = paymentRequired
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1044
? bookingAmountMinor(settings.paymentRatePerMinute, duration, settings.paymentCurrency)
? bookingAmountMinor(settings.paymentRatePerMinute, duration, settings.paymentCurrency)
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1045
: 0;
: 0;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1046
if (paymentRequired && amountMinor <= 0) {
if (paymentRequired && amountMinor <= 0) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1047
return json({ error: 'The configured per-minute price is too small for this currency.' }, 409);
return json({ error: 'The configured per-minute price is too small for this currency.' }, 409);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1048
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1049
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1050
const dateKey = dateKeyInZone(new Date(startMs), settings.timezone);
const dateKey = dateKeyInZone(new Date(startMs), settings.timezone);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1051
const availability = await computeAvailability(env, dateKey);
const availability = await computeAvailability(env, dateKey);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1052
const matchingSlot = availability.slots.find((slot) => slot.start === new Date(startMs).toISOString());
const matchingSlot = availability.slots.find((slot) => slot.start === new Date(startMs).toISOString());
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1053
if (!matchingSlot || !matchingSlot.durations.includes(duration)) {
if (!matchingSlot || !matchingSlot.durations.includes(duration)) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1054
return json({ error: 'That slot is no longer available. Pick another time.' }, 409);
return json({ error: 'That slot is no longer available. Pick another time.' }, 409);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1055
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1056
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1057
const endMs = addMinutes(startMs, duration);
const endMs = addMinutes(startMs, duration);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1058
const lockStart = addMinutes(startMs, -settings.bufferBeforeMinutes);
const lockStart = addMinutes(startMs, -settings.bufferBeforeMinutes);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1059
const lockEnd = addMinutes(endMs, settings.bufferAfterMinutes);
const lockEnd = addMinutes(endMs, settings.bufferAfterMinutes);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1060
const id = crypto.randomUUID();
const id = crypto.randomUUID();
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1061
const publicBookingId = newPublicBookingId();
const publicBookingId = newPublicBookingId();
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1062
const lockExpiry = Date.now() + (paymentRequired ? 35 : 3) * 60_000;
const lockExpiry = Date.now() + (paymentRequired ? 35 : 3) * 60_000;
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1063
const keys = slotKeys(lockStart, lockEnd, settings.slotIncrementMinutes);
const keys = slotKeys(lockStart, lockEnd, settings.slotIncrementMinutes);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1064
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1065
await env.DB.prepare('DELETE FROM slot_locks WHERE expires_at < ?1').bind(Date.now()).run();
await env.DB.prepare('DELETE FROM slot_locks WHERE expires_at < ?1').bind(Date.now()).run();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1066
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1067
const statements: D1PreparedStatement[] = [
const statements: D1PreparedStatement[] = [
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1068
env.DB.prepare(`
env.DB.prepare(`
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1069
INSERT INTO bookings (
INSERT INTO bookings (
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1070
id, public_booking_id, name, email, phone, message, start_time, end_time,
id, public_booking_id, name, email, phone, message, start_time, end_time,
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1071
duration_minutes, timezone, meeting_mode, status,
duration_minutes, timezone, meeting_mode, status,
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1072
payment_status, payment_amount, payment_currency
payment_status, payment_amount, payment_currency
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1073
) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, 'pending', ?12, ?13, ?14)
) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, 'pending', ?12, ?13, ?14)
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1074
`).bind(
`).bind(
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1075
id,
id,
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1076
publicBookingId,
publicBookingId,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1077
name,
name,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1078
email,
email,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1079
phone || null,
phone || null,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1080
message || null,
message || null,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1081
new Date(startMs).toISOString(),
new Date(startMs).toISOString(),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1082
new Date(endMs).toISOString(),
new Date(endMs).toISOString(),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1083
duration,
duration,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1084
settings.timezone,
settings.timezone,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1085
request.meetingMode,
request.meetingMode,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1086
paymentRequired ? 'awaiting_checkout' : 'not_requested',
paymentRequired ? 'awaiting_checkout' : 'not_requested',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1087
paymentRequired ? amountMinor : null,
paymentRequired ? amountMinor : null,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1088
paymentRequired ? settings.paymentCurrency : null,
paymentRequired ? settings.paymentCurrency : null,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1089
),
),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1090
...keys.map((key) =>
...keys.map((key) =>
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1091
env.DB.prepare('INSERT INTO slot_locks (slot_key, booking_id, expires_at) VALUES (?1, ?2, ?3)')
env.DB.prepare('INSERT INTO slot_locks (slot_key, booking_id, expires_at) VALUES (?1, ?2, ?3)')
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1092
.bind(key, id, lockExpiry),
.bind(key, id, lockExpiry),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1093
),
),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1094
];
];
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1095
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1096
try {
try {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1097
await env.DB.batch(statements);
await env.DB.batch(statements);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1098
} catch {
} catch {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1099
return json({ error: 'Someone just took that time. Please choose another slot.' }, 409);
return json({ error: 'Someone just took that time. Please choose another slot.' }, 409);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1100
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1101
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1102
let holdEventId: string | null = null;
let holdEventId: string | null = null;
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1103
try {
try {
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1104
// Recheck Google after the D1 reservation. Paid bookings then get a private
// Recheck Google after the D1 reservation. Paid bookings then get a private
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1105
// owner-only calendar hold, so the visitor receives no invitation or Meet link
// owner-only calendar hold, so the visitor receives no invitation or Meet link
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1106
// until Stripe says the payment succeeded.
// until Stripe says the payment succeeded.
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1107
const fresh = await queryBusy(
const fresh = await queryBusy(
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1108
env,
env,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1109
settings,
settings,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1110
new Date(lockStart).toISOString(),
new Date(lockStart).toISOString(),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1111
new Date(lockEnd).toISOString(),
new Date(lockEnd).toISOString(),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1112
);
);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1113
const conflicts = fresh.some((range) =>
const conflicts = fresh.some((range) =>
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1114
lockStart < Date.parse(range.end) && lockEnd > Date.parse(range.start),
lockStart < Date.parse(range.end) && lockEnd > Date.parse(range.start),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1115
);
);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1116
if (conflicts) throw new Error('That slot became busy in Google Calendar.');
if (conflicts) throw new Error('That slot became busy in Google Calendar.');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1117
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1118
if (paymentRequired) {
if (paymentRequired) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1119
const hold = await createCalendarHold(env, settings, {
const hold = await createCalendarHold(env, settings, {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1120
id,
id,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1121
start: new Date(startMs).toISOString(),
start: new Date(startMs).toISOString(),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1122
end: new Date(endMs).toISOString(),
end: new Date(endMs).toISOString(),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1123
meetingMode: request.meetingMode,
meetingMode: request.meetingMode,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1124
});
});
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1125
holdEventId = hold.eventId;
holdEventId = hold.eventId;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1126
await env.DB.prepare(`
await env.DB.prepare(`
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1127
UPDATE bookings
UPDATE bookings
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1128
SET google_event_id = ?1,
SET google_event_id = ?1,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1129
meet_url = ?2,
meet_url = ?2,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1130
calendar_sync_status = 'held',
calendar_sync_status = 'held',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1131
calendar_sync_updated_at = datetime('now'),
calendar_sync_updated_at = datetime('now'),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1132
updated_at = datetime('now')
updated_at = datetime('now')
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1133
WHERE id = ?3
WHERE id = ?3
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1134
`).bind(hold.eventId, hold.meetUrl, id).run();
`).bind(hold.eventId, hold.meetUrl, id).run();
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1135
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1136
const session = await createStripeCheckoutSession(env, {
const session = await createStripeCheckoutSession(env, {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1137
id,
id,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1138
email,
email,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1139
durationMinutes: duration,
durationMinutes: duration,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1140
amountMinor,
amountMinor,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1141
currency: settings.paymentCurrency,
currency: settings.paymentCurrency,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1142
label: settings.paymentLabel,
label: settings.paymentLabel,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1143
});
});
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1144
if (!session.id || !session.url) throw new StripeError('Stripe did not return a Checkout URL.');
if (!session.id || !session.url) throw new StripeError('Stripe did not return a Checkout URL.');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1145
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1146
await env.DB.prepare(`
await env.DB.prepare(`
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1147
UPDATE bookings
UPDATE bookings
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1148
SET payment_status = 'checkout_open',
SET payment_status = 'checkout_open',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1149
stripe_checkout_session_id = ?1,
stripe_checkout_session_id = ?1,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1150
updated_at = datetime('now')
updated_at = datetime('now')
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1151
WHERE id = ?2
WHERE id = ?2
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1152
`).bind(session.id, id).run();
`).bind(session.id, id).run();
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1153
await logActivity(env, id, 'payment_checkout_started', {
await logActivity(env, id, 'payment_checkout_started', {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1154
start: new Date(startMs).toISOString(),
start: new Date(startMs).toISOString(),
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1155
end: new Date(endMs).toISOString(),
end: new Date(endMs).toISOString(),
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1156
duration,
duration,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1157
amount: amountMinor,
amount: amountMinor,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1158
currency: settings.paymentCurrency,
currency: settings.paymentCurrency,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1159
}, `checkout:${session.id}:opened`);
}, `checkout:${session.id}:opened`);
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1160
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1161
return json({
return json({
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1162
ok: true,
ok: true,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1163
requiresPayment: true,
requiresPayment: true,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1164
checkoutUrl: session.url,
checkoutUrl: session.url,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1165
bookingId: id,
bookingId: id,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1166
amountMinor,
amountMinor,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1167
currency: settings.paymentCurrency,
currency: settings.paymentCurrency,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1168
}, 201);
}, 201);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1169
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1170
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1171
const created = await createCalendarEvent(env, settings, {
const created = await createCalendarEvent(env, settings, {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1172
id,
id,
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1173
publicBookingId,
publicBookingId,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1174
name,
name,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1175
email,
email,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1176
phone: phone || undefined,
phone: phone || undefined,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1177
message: message || undefined,
message: message || undefined,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1178
start: new Date(startMs).toISOString(),
start: new Date(startMs).toISOString(),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1179
end: new Date(endMs).toISOString(),
end: new Date(endMs).toISOString(),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1180
meetingMode: request.meetingMode,
meetingMode: request.meetingMode,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1181
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1182
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1183
await env.DB.batch([
await env.DB.batch([
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1184
env.DB.prepare(`
env.DB.prepare(`
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1185
UPDATE bookings
UPDATE bookings
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1186
SET status = 'confirmed', google_event_id = ?1, meet_url = ?2,
SET status = 'confirmed', google_event_id = ?1, meet_url = ?2,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1187
calendar_sync_status = 'synced', calendar_sync_updated_at = datetime('now'),
calendar_sync_status = 'synced', calendar_sync_updated_at = datetime('now'),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1188
updated_at = datetime('now')
updated_at = datetime('now')
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1189
WHERE id = ?3
WHERE id = ?3
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1190
`).bind(created.eventId, created.meetUrl, id),
`).bind(created.eventId, created.meetUrl, id),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1191
env.DB.prepare('UPDATE slot_locks SET expires_at = ?1 WHERE booking_id = ?2')
env.DB.prepare('UPDATE slot_locks SET expires_at = ?1 WHERE booking_id = ?2')
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1192
.bind(Date.now() + 10 * 60_000, id),
.bind(Date.now() + 10 * 60_000, id),
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1193
]);
]);
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1194
await logActivity(env, id, 'booking_confirmed', {
await logActivity(env, id, 'booking_confirmed', {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1195
start: new Date(startMs).toISOString(),
start: new Date(startMs).toISOString(),
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1196
end: new Date(endMs).toISOString(),
end: new Date(endMs).toISOString(),
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1197
duration,
duration,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1198
paid: false,
paid: false,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1199
}, `booking:${id}:confirmed`);
}, `booking:${id}:confirmed`);
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1200
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1201
return json({
return json({
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1202
ok: true,
ok: true,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1203
requiresPayment: false,
requiresPayment: false,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1204
booking: {
booking: {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1205
id,
id,
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1206
bookingId: publicBookingId,
bookingId: publicBookingId,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1207
start: new Date(startMs).toISOString(),
start: new Date(startMs).toISOString(),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1208
end: new Date(endMs).toISOString(),
end: new Date(endMs).toISOString(),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1209
duration,
duration,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1210
timezone: settings.timezone,
timezone: settings.timezone,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1211
meetingMode: request.meetingMode,
meetingMode: request.meetingMode,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1212
meetUrl: created.meetUrl,
meetUrl: created.meetUrl,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1213
},
},
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1214
}, 201);
}, 201);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1215
} catch (error) {
} catch (error) {
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1216
if (holdEventId) {
if (holdEventId) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1217
await deleteCalendarEvent(env, settings, holdEventId).catch(() => undefined);
await deleteCalendarEvent(env, settings, holdEventId).catch(() => undefined);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1218
}
}
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1219
await env.DB.batch([
await env.DB.batch([
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1220
env.DB.prepare('DELETE FROM slot_locks WHERE booking_id = ?1').bind(id),
env.DB.prepare('DELETE FROM slot_locks WHERE booking_id = ?1').bind(id),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1221
env.DB.prepare('DELETE FROM bookings WHERE id = ?1').bind(id),
env.DB.prepare('DELETE FROM bookings WHERE id = ?1').bind(id),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1222
]).catch(() => undefined);
]).catch(() => undefined);
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1223
if (error instanceof StripeError) return json({ error: error.message }, error.status);
if (error instanceof StripeError) return json({ error: error.message }, error.status);
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1224
const message = errorMessage(error);
const message = errorMessage(error);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1225
const status = message.includes('became busy') ? 409 : 502;
const status = message.includes('became busy') ? 409 : 502;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1226
return json({ error: message }, status);
return json({ error: message }, status);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1227
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1228
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1229
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1230
async function createPaymentCheckout(env: Env, bookingId: string): Promise<Response> {
async function createPaymentCheckout(env: Env, bookingId: string): Promise<Response> {
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1231
if (!/^[0-9a-f-]{36}$/i.test(bookingId)) return json({ error: 'Invalid booking id.' }, 400);
if (!/^[0-9a-f-]{36}$/i.test(bookingId)) return json({ error: 'Invalid booking id.' }, 400);
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1232
if (!stripeConfigured(env)) return json({ error: 'Stripe is not configured for this deployment.' }, 503);
if (!stripeConfigured(env)) return json({ error: 'Stripe is not configured for this deployment.' }, 503);
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1233
const booking = await paymentBookingById(env, bookingId);
const booking = await paymentBookingById(env, bookingId);
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1234
if (!booking) return json({ error: 'Booking not found.' }, 404);
if (!booking) return json({ error: 'Booking not found.' }, 404);
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1235
if (booking.status === 'confirmed' && booking.payment_status === 'paid') return json({ ok: true, paid: true, booking: publicConfirmation(booking) });
if (booking.status === 'confirmed' && booking.payment_status === 'paid') return json({ ok: true, paid: true, booking: publicConfirmation(booking) });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1236
if (booking.status !== 'pending' || !booking.stripe_checkout_session_id) {
if (booking.status !== 'pending' || !booking.stripe_checkout_session_id) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1237
return json({ error: 'This booking does not have an active payment checkout.' }, 409);
return json({ error: 'This booking does not have an active payment checkout.' }, 409);
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1238
}
}
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1239
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1240
try {
try {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1241
const session = await retrieveStripeCheckoutSession(env, booking.stripe_checkout_session_id);
const session = await retrieveStripeCheckoutSession(env, booking.stripe_checkout_session_id);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1242
if (session.payment_status === 'paid') {
if (session.payment_status === 'paid') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1243
await recordPaidSession(env, booking.id, session);
await recordPaidSession(env, booking.id, session);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1244
const confirmed = await fulfillPaidBooking(env, booking.id);
const confirmed = await fulfillPaidBooking(env, booking.id);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1245
return json({ ok: true, paid: true, booking: publicConfirmation(confirmed) });
return json({ ok: true, paid: true, booking: publicConfirmation(confirmed) });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1246
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1247
if (session.status === 'open' && session.url) return json({ ok: true, url: session.url });
if (session.status === 'open' && session.url) return json({ ok: true, url: session.url });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1248
if (session.status === 'complete') return json({ ok: true, processing: true });
if (session.status === 'complete') return json({ ok: true, processing: true });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1249
return json({ error: 'That Stripe checkout is no longer active. Please book the slot again.' }, 409);
return json({ error: 'That Stripe checkout is no longer active. Please book the slot again.' }, 409);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1250
} catch (error) {
} catch (error) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1251
if (error instanceof StripeError) return json({ error: error.message }, error.status);
if (error instanceof StripeError) return json({ error: error.message }, error.status);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1252
throw error;
throw error;
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1253
}
}
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1254
}
}
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1255
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1256
async function paymentStatus(env: Env, sessionId: string): Promise<Response> {
async function paymentStatus(env: Env, sessionId: string): Promise<Response> {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1257
if (!stripeConfigured(env)) return json({ error: 'Stripe is not configured for this deployment.' }, 503);
if (!stripeConfigured(env)) return json({ error: 'Stripe is not configured for this deployment.' }, 503);
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1258
try {
try {
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1259
const session = await retrieveStripeCheckoutSession(env, sessionId);
const session = await retrieveStripeCheckoutSession(env, sessionId);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1260
const bookingId = session.metadata?.booking_id || session.client_reference_id;
const bookingId = session.metadata?.booking_id || session.client_reference_id;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1261
if (!bookingId || !/^[0-9a-f-]{36}$/i.test(bookingId)) {
if (!bookingId || !/^[0-9a-f-]{36}$/i.test(bookingId)) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1262
return json({ state: 'missing' }, 404);
return json({ state: 'missing' }, 404);
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1263
}
}
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1264
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1265
const existing = await paymentBookingById(env, bookingId);
const existing = await paymentBookingById(env, bookingId);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1266
if (existing?.status === 'confirmed') {
if (existing?.status === 'confirmed') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1267
const receiptUrl = session.payment_status === 'paid'
const receiptUrl = session.payment_status === 'paid'
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1268
? await stripeReceiptUrl(env, session).catch(() => null)
? await stripeReceiptUrl(env, session).catch(() => null)
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1269
: null;
: null;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1270
return json({ state: 'confirmed', booking: publicConfirmation(existing, receiptUrl) });
return json({ state: 'confirmed', booking: publicConfirmation(existing, receiptUrl) });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1271
}
}
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1272
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1273
if (session.payment_status === 'paid') {
if (session.payment_status === 'paid') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1274
await recordPaidSession(env, bookingId, session);
await recordPaidSession(env, bookingId, session);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1275
try {
try {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1276
const confirmed = await fulfillPaidBooking(env, bookingId);
const confirmed = await fulfillPaidBooking(env, bookingId);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1277
const receiptUrl = await stripeReceiptUrl(env, session).catch(() => null);
const receiptUrl = await stripeReceiptUrl(env, session).catch(() => null);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1278
return json({ state: 'confirmed', booking: publicConfirmation(confirmed, receiptUrl) });
return json({ state: 'confirmed', booking: publicConfirmation(confirmed, receiptUrl) });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1279
} catch {
} catch {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1280
return json({ state: 'confirming', message: 'Payment received. Finalizing your calendar invitation…' });
return json({ state: 'confirming', message: 'Payment received. Finalizing your calendar invitation…' });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1281
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1282
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1283
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1284
if (session.status === 'complete') {
if (session.status === 'complete') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1285
return json({ state: 'processing', message: 'Stripe is still processing the payment.' });
return json({ state: 'processing', message: 'Stripe is still processing the payment.' });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1286
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1287
if (session.status === 'expired') {
if (session.status === 'expired') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1288
const settings = await getSettings(env);
const settings = await getSettings(env);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1289
await releasePendingBooking(env, settings, bookingId).catch(() => undefined);
await releasePendingBooking(env, settings, bookingId).catch(() => undefined);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1290
return json({ state: 'expired', message: 'Payment expired. No booking was confirmed.' });
return json({ state: 'expired', message: 'Payment expired. No booking was confirmed.' });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1291
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1292
return json({ state: 'awaiting_payment', message: 'Payment has not completed yet.' });
return json({ state: 'awaiting_payment', message: 'Payment has not completed yet.' });
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1293
} catch (error) {
} catch (error) {
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1294
if (error instanceof StripeError) return json({ error: error.message }, error.status);
if (error instanceof StripeError) return json({ error: error.message }, error.status);
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1295
throw error;
throw error;
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1296
}
}
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1297
}
}
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1298
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1299
async function cancelPendingPayment(
async function cancelPendingPayment(
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1300
env: Env,
env: Env,
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1301
bookingId: string,
bookingId: string,
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1302
options: { allowStaleStripeRelease?: boolean } = {},
options: { allowStaleStripeRelease?: boolean } = {},
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1303
): Promise<Response> {
): Promise<Response> {
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1304
if (!/^[0-9a-f-]{36}$/i.test(bookingId)) return json({ error: 'Invalid booking id.' }, 400);
if (!/^[0-9a-f-]{36}$/i.test(bookingId)) return json({ error: 'Invalid booking id.' }, 400);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1305
const booking = await paymentBookingById(env, bookingId);
const booking = await paymentBookingById(env, bookingId);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1306
if (!booking) return json({ ok: true, state: 'cancelled' });
if (!booking) return json({ ok: true, state: 'cancelled' });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1307
if (booking.status === 'confirmed') return json({ ok: true, state: 'confirmed', booking: publicConfirmation(booking) });
if (booking.status === 'confirmed') return json({ ok: true, state: 'confirmed', booking: publicConfirmation(booking) });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1308
if (booking.status === 'confirming') return json({ ok: true, state: 'processing' });
if (booking.status === 'confirming') return json({ ok: true, state: 'processing' });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1309
if (booking.status !== 'pending') return json({ ok: true, state: booking.status });
if (booking.status !== 'pending') return json({ ok: true, state: booking.status });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1310
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1311
const settings = await getSettings(env);
const settings = await getSettings(env);
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1312
let releaseWarning: string | null = null;
let releaseWarning: string | null = null;
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1313
const sessionId = booking.stripe_checkout_session_id;
const sessionId = booking.stripe_checkout_session_id;
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1314
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1315
if (sessionId && stripeConfigured(env)) {
if (sessionId && stripeConfigured(env)) {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1316
const sessionMode = stripeCheckoutSessionMode(sessionId);
const sessionMode = stripeCheckoutSessionMode(sessionId);
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1317
const configuredMode = stripeMode(env);
const configuredMode = stripeMode(env);
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1318
const modeMismatch = sessionMode !== 'unknown'
const modeMismatch = sessionMode !== 'unknown'
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1319
&& configuredMode !== 'unknown'
&& configuredMode !== 'unknown'
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1320
&& sessionMode !== configuredMode;
&& sessionMode !== configuredMode;
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1321
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1322
if (modeMismatch) {
if (modeMismatch) {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1323
if (!options.allowStaleStripeRelease) {
if (!options.allowStaleStripeRelease) {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1324
return json({
return json({
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1325
error: `This payment hold was created in Stripe ${sessionMode} mode, but this deployment is using ${configuredMode} mode. Switch back to the ${sessionMode} key to expire that Checkout session, or release it from Admin.`,
error: `This payment hold was created in Stripe ${sessionMode} mode, but this deployment is using ${configuredMode} mode. Switch back to the ${sessionMode} key to expire that Checkout session, or release it from Admin.`,
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1326
code: 'stripe_mode_mismatch',
code: 'stripe_mode_mismatch',
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1327
sessionMode,
sessionMode,
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1328
configuredMode,
configuredMode,
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1329
}, 409);
}, 409);
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1330
}
}
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1331
releaseWarning = `Released locally. The hold belongs to Stripe ${sessionMode} mode while this Worker uses ${configuredMode} mode, so Slot could not expire the old Stripe Checkout session.`;
releaseWarning = `Released locally. The hold belongs to Stripe ${sessionMode} mode while this Worker uses ${configuredMode} mode, so Slot could not expire the old Stripe Checkout session.`;
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1332
} else {
} else {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1333
try {
try {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1334
const session = await retrieveStripeCheckoutSession(env, sessionId);
const session = await retrieveStripeCheckoutSession(env, sessionId);
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1335
if (session.payment_status === 'paid') {
if (session.payment_status === 'paid') {
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1336
await recordPaidSession(env, booking.id, session);
await recordPaidSession(env, booking.id, session);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1337
const confirmed = await fulfillPaidBooking(env, booking.id);
const confirmed = await fulfillPaidBooking(env, booking.id);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1338
return json({ ok: true, state: 'confirmed', booking: publicConfirmation(confirmed) });
return json({ ok: true, state: 'confirmed', booking: publicConfirmation(confirmed) });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1339
}
}
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1340
if (session.status === 'complete') {
if (session.status === 'complete') {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1341
return json({ ok: true, state: 'processing' });
return json({ ok: true, state: 'processing' });
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1342
}
}
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1343
if (session.status === 'open') await expireStripeCheckoutSession(env, session.id);
if (session.status === 'open') await expireStripeCheckoutSession(env, session.id);
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1344
} catch (error) {
} catch (error) {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1345
if (error instanceof StripeError) {
if (error instanceof StripeError) {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1346
// A resource_missing error is what Stripe returns when a Checkout
// A resource_missing error is what Stripe returns when a Checkout
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1347
// session belongs to another account/mode. Admin has already made an
// session belongs to another account/mode. Admin has already made an
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1348
// explicit release decision, so let it clean up the local/calendar hold
// explicit release decision, so let it clean up the local/calendar hold
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1349
// instead of trapping the slot behind a stale Stripe id.
// instead of trapping the slot behind a stale Stripe id.
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1350
if (options.allowStaleStripeRelease && (error.code === 'resource_missing' || /No such checkout\.session/i.test(error.message))) {
if (options.allowStaleStripeRelease && (error.code === 'resource_missing' || /No such checkout\.session/i.test(error.message))) {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1351
releaseWarning = 'Released locally because Stripe could not find the stored Checkout session with the currently configured key.';
releaseWarning = 'Released locally because Stripe could not find the stored Checkout session with the currently configured key.';
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1352
} else {
} else {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1353
return json({ error: error.message }, error.status);
return json({ error: error.message }, error.status);
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1354
}
}
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1355
} else {
} else {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1356
throw error;
throw error;
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1357
}
}
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1358
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1359
}
}
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1360
} else if (sessionId && options.allowStaleStripeRelease) {
} else if (sessionId && options.allowStaleStripeRelease) {
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1361
releaseWarning = 'Released locally. Stripe is not configured on this deployment, so Slot could not expire the stored Checkout session.';
releaseWarning = 'Released locally. Stripe is not configured on this deployment, so Slot could not expire the stored Checkout session.';
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1362
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1363
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1364
await releasePendingBooking(env, settings, booking.id);
await releasePendingBooking(env, settings, booking.id);
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1365
return json({ ok: true, state: 'cancelled', warning: releaseWarning });
return json({ ok: true, state: 'cancelled', warning: releaseWarning });
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1366
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1367
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1368
async function paymentCancelReturn(env: Env, bookingId: string): Promise<Response> {
async function paymentCancelReturn(env: Env, bookingId: string): Promise<Response> {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1369
const appUrl = env.APP_URL.replace(/\/+$/, '');
const appUrl = env.APP_URL.replace(/\/+$/, '');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1370
if (!/^[0-9a-f-]{36}$/i.test(bookingId)) {
if (!/^[0-9a-f-]{36}$/i.test(bookingId)) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1371
return redirect(`${appUrl}/?payment=cancelled&release_error=invalid_booking`);
return redirect(`${appUrl}/?payment=cancelled&release_error=invalid_booking`);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1372
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1373
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1374
const before = await paymentBookingById(env, bookingId);
const before = await paymentBookingById(env, bookingId);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1375
const sessionId = before?.stripe_checkout_session_id ?? null;
const sessionId = before?.stripe_checkout_session_id ?? null;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1376
const response = await cancelPendingPayment(env, bookingId);
const response = await cancelPendingPayment(env, bookingId);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1377
const payload = await response.clone().json().catch(() => ({})) as { state?: string };
const payload = await response.clone().json().catch(() => ({})) as { state?: string };
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1378
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1379
if (response.ok && (payload.state === 'confirmed' || payload.state === 'processing') && sessionId) {
if (response.ok && (payload.state === 'confirmed' || payload.state === 'processing') && sessionId) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1380
return redirect(`${appUrl}/?payment=success&session_id=${encodeURIComponent(sessionId)}`);
return redirect(`${appUrl}/?payment=success&session_id=${encodeURIComponent(sessionId)}`);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1381
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1382
if (response.ok && payload.state === 'cancelled') {
if (response.ok && payload.state === 'cancelled') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1383
return redirect(`${appUrl}/?payment=cancelled&released=1`);
return redirect(`${appUrl}/?payment=cancelled&released=1`);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1384
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1385
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1386
// Keep the booking id only on the error fallback so the browser can retry the
// Keep the booking id only on the error fallback so the browser can retry the
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1387
// release through the normal POST endpoint and show a useful error if needed.
// release through the normal POST endpoint and show a useful error if needed.
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1388
return redirect(`${appUrl}/?payment=cancelled&booking_id=${encodeURIComponent(bookingId)}&release_error=1`);
return redirect(`${appUrl}/?payment=cancelled&booking_id=${encodeURIComponent(bookingId)}&release_error=1`);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1389
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1390
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1391
async function handleStripeWebhook(request: Request, env: Env): Promise<Response> {
async function handleStripeWebhook(request: Request, env: Env): Promise<Response> {
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1392
const rawBody = await request.text();
const rawBody = await request.text();
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1393
try {
try {
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1394
const event = await verifyStripeWebhook(env, rawBody, request.headers.get('Stripe-Signature'));
const event = await verifyStripeWebhook(env, rawBody, request.headers.get('Stripe-Signature'));
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1395
const object = event.data?.object;
const object = event.data?.object;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1396
if (!object) return json({ received: true });
if (!object) return json({ received: true });
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1397
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1398
if (object.object === 'refund') {
if (object.object === 'refund') {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1399
const refund = object as StripeRefund;
const refund = object as StripeRefund;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1400
const bookingId = refund.metadata?.booking_id;
const bookingId = refund.metadata?.booking_id;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1401
if (bookingId && /^[0-9a-f-]{36}$/i.test(bookingId)) {
if (bookingId && /^[0-9a-f-]{36}$/i.test(bookingId)) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1402
const status = event.type === 'refund.failed' ? 'failed' : (refund.status ?? 'pending');
const status = event.type === 'refund.failed' ? 'failed' : (refund.status ?? 'pending');
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1403
await env.DB.prepare(`
await env.DB.prepare(`
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1404
UPDATE bookings
UPDATE bookings
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1405
SET refund_status = ?1,
SET refund_status = ?1,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1406
stripe_refund_id = COALESCE(stripe_refund_id, ?2),
stripe_refund_id = COALESCE(stripe_refund_id, ?2),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1407
refunded_amount = COALESCE(?3, refunded_amount),
refunded_amount = COALESCE(?3, refunded_amount),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1408
refunded_at = CASE WHEN ?1 = 'succeeded' THEN COALESCE(refunded_at, datetime('now')) ELSE refunded_at END,
refunded_at = CASE WHEN ?1 = 'succeeded' THEN COALESCE(refunded_at, datetime('now')) ELSE refunded_at END,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1409
updated_at = datetime('now')
updated_at = datetime('now')
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1410
WHERE id = ?4
WHERE id = ?4
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1411
`).bind(status, refund.id, refund.amount ?? null, bookingId).run();
`).bind(status, refund.id, refund.amount ?? null, bookingId).run();
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1412
await logActivity(env, bookingId,
await logActivity(env, bookingId,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1413
status === 'succeeded' ? 'refund_succeeded' : status === 'failed' ? 'refund_failed' : 'refund_started',
status === 'succeeded' ? 'refund_succeeded' : status === 'failed' ? 'refund_failed' : 'refund_started',
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1414
{ amount: refund.amount ?? null, currency: refund.currency ?? null, refundStatus: status },
{ amount: refund.amount ?? null, currency: refund.currency ?? null, refundStatus: status },
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1415
`refund:${refund.id}:${status}`,
`refund:${refund.id}:${status}`,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1416
);
);
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1417
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1418
return json({ received: true });
return json({ received: true });
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1419
}
}
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1420
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1421
if (object.object !== 'checkout.session') return json({ received: true });
if (object.object !== 'checkout.session') return json({ received: true });
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1422
const session = object;
const session = object;
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1423
const bookingId = session.metadata?.booking_id || session.client_reference_id;
const bookingId = session.metadata?.booking_id || session.client_reference_id;
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1424
if (!bookingId || !/^[0-9a-f-]{36}$/i.test(bookingId)) return json({ received: true });
if (!bookingId || !/^[0-9a-f-]{36}$/i.test(bookingId)) return json({ received: true });
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1425
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1426
if (event.type === 'checkout.session.completed' || event.type === 'checkout.session.async_payment_succeeded') {
if (event.type === 'checkout.session.completed' || event.type === 'checkout.session.async_payment_succeeded') {
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1427
const paid = session.payment_status === 'paid' || event.type === 'checkout.session.async_payment_succeeded';
const paid = session.payment_status === 'paid' || event.type === 'checkout.session.async_payment_succeeded';
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1428
if (paid) {
if (paid) {
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1429
await recordPaidSession(env, bookingId, session);
await recordPaidSession(env, bookingId, session);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1430
await fulfillPaidBooking(env, bookingId);
await fulfillPaidBooking(env, bookingId);
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1431
} else {
} else {
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1432
await env.DB.prepare(`
await env.DB.prepare(`
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1433
UPDATE bookings
UPDATE bookings
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1434
SET payment_status = CASE WHEN payment_status = 'paid' THEN 'paid' ELSE 'processing' END,
SET payment_status = CASE WHEN payment_status = 'paid' THEN 'paid' ELSE 'processing' END,
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1435
payment_amount = COALESCE(?1, payment_amount),
payment_amount = COALESCE(?1, payment_amount),
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1436
payment_currency = COALESCE(?2, payment_currency),
payment_currency = COALESCE(?2, payment_currency),
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1437
stripe_payment_intent_id = COALESCE(?3, stripe_payment_intent_id),
stripe_payment_intent_id = COALESCE(?3, stripe_payment_intent_id),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1438
updated_at = datetime('now')
updated_at = datetime('now')
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1439
WHERE id = ?4
WHERE id = ?4
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1440
AND stripe_checkout_session_id = ?5
AND stripe_checkout_session_id = ?5
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1441
`).bind(
`).bind(
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1442
session.amount_total ?? null,
session.amount_total ?? null,
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1443
session.currency ?? null,
session.currency ?? null,
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1444
stripePaymentIntentId(session),
stripePaymentIntentId(session),
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1445
bookingId,
bookingId,
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1446
session.id,
session.id,
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1447
).run();
).run();
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1448
}
}
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1449
} else if (event.type === 'checkout.session.async_payment_failed' || event.type === 'checkout.session.expired') {
} else if (event.type === 'checkout.session.async_payment_failed' || event.type === 'checkout.session.expired') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1450
const settings = await getSettings(env);
const settings = await getSettings(env);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1451
await releasePendingBooking(env, settings, bookingId);
await releasePendingBooking(env, settings, bookingId);
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1452
}
}
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1453
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1454
return json({ received: true });
return json({ received: true });
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1455
} catch (error) {
} catch (error) {
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1456
if (error instanceof StripeError) return json({ error: error.message }, error.status);
if (error instanceof StripeError) return json({ error: error.message }, error.status);
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1457
throw error;
throw error;
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1458
}
}
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1459
}
}
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1460
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1461
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1462
async function assertRescheduleSlotAvailable(
async function assertRescheduleSlotAvailable(
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1463
env: Env,
env: Env,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1464
booking: PaymentBookingRow,
booking: PaymentBookingRow,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1465
startIso: string,
startIso: string,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1466
): Promise<{ settings: AppSettings; startMs: number; endMs: number }> {
): Promise<{ settings: AppSettings; startMs: number; endMs: number }> {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1467
const startMs = Date.parse(startIso);
const startMs = Date.parse(startIso);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1468
if (!Number.isFinite(startMs) || startMs <= Date.now()) throw new Error('Choose a future time.');
if (!Number.isFinite(startMs) || startMs <= Date.now()) throw new Error('Choose a future time.');
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1469
const settings = await getSettings(env);
const settings = await getSettings(env);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1470
const dateKey = dateKeyInZone(new Date(startMs), settings.timezone);
const dateKey = dateKeyInZone(new Date(startMs), settings.timezone);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1471
const availability = await computeAvailability(env, dateKey);
const availability = await computeAvailability(env, dateKey);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1472
const matching = availability.slots.find((slot) => slot.start === new Date(startMs).toISOString());
const matching = availability.slots.find((slot) => slot.start === new Date(startMs).toISOString());
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1473
if (!matching || !matching.durations.includes(booking.duration_minutes)) {
if (!matching || !matching.durations.includes(booking.duration_minutes)) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1474
throw new Error('That suggested time is no longer available. Choose another time.');
throw new Error('That suggested time is no longer available. Choose another time.');
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1475
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1476
return { settings, startMs, endMs: addMinutes(startMs, booking.duration_minutes) };
return { settings, startMs, endMs: addMinutes(startMs, booking.duration_minutes) };
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1477
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1478
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1479
async function rescheduleConfirmedBooking(
async function rescheduleConfirmedBooking(
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1480
env: Env,
env: Env,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1481
booking: PaymentBookingRow,
booking: PaymentBookingRow,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1482
startIso: string,
startIso: string,
Alex Nord
about 16 hours ago
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1483
source: 'admin' | 'guest_suggestion' | 'guest_self' = 'admin',
source: 'admin' | 'guest_suggestion' | 'guest_self' = 'admin',
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1484
): Promise<PaymentBookingRow> {
): Promise<PaymentBookingRow> {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1485
if (booking.status !== 'confirmed') throw new Error('Only confirmed bookings can be rescheduled.');
if (booking.status !== 'confirmed') throw new Error('Only confirmed bookings can be rescheduled.');
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1486
if (!booking.google_event_id) throw new Error('This booking is missing its Google Calendar event.');
if (!booking.google_event_id) throw new Error('This booking is missing its Google Calendar event.');
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1487
const { settings, startMs, endMs } = await assertRescheduleSlotAvailable(env, booking, startIso);
const { settings, startMs, endMs } = await assertRescheduleSlotAvailable(env, booking, startIso);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1488
const lockStart = addMinutes(startMs, -settings.bufferBeforeMinutes);
const lockStart = addMinutes(startMs, -settings.bufferBeforeMinutes);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1489
const lockEnd = addMinutes(endMs, settings.bufferAfterMinutes);
const lockEnd = addMinutes(endMs, settings.bufferAfterMinutes);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1490
const keys = slotKeys(lockStart, lockEnd, settings.slotIncrementMinutes);
const keys = slotKeys(lockStart, lockEnd, settings.slotIncrementMinutes);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1491
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1492
await env.DB.prepare('DELETE FROM slot_locks WHERE expires_at < ?1').bind(Date.now()).run();
await env.DB.prepare('DELETE FROM slot_locks WHERE expires_at < ?1').bind(Date.now()).run();
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1493
await env.DB.prepare('DELETE FROM slot_locks WHERE booking_id = ?1').bind(booking.id).run();
await env.DB.prepare('DELETE FROM slot_locks WHERE booking_id = ?1').bind(booking.id).run();
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1494
try {
try {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1495
await env.DB.batch(keys.map((key) =>
await env.DB.batch(keys.map((key) =>
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1496
env.DB.prepare('INSERT INTO slot_locks (slot_key, booking_id, expires_at) VALUES (?1, ?2, ?3)')
env.DB.prepare('INSERT INTO slot_locks (slot_key, booking_id, expires_at) VALUES (?1, ?2, ?3)')
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1497
.bind(key, booking.id, Date.now() + 3 * 60_000),
.bind(key, booking.id, Date.now() + 3 * 60_000),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1498
));
));
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1499
} catch {
} catch {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1500
throw new Error('Someone just took that time. Choose another slot.');
throw new Error('Someone just took that time. Choose another slot.');
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1501
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1502
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1503
try {
try {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1504
const fresh = await queryBusy(env, settings, new Date(lockStart).toISOString(), new Date(lockEnd).toISOString());
const fresh = await queryBusy(env, settings, new Date(lockStart).toISOString(), new Date(lockEnd).toISOString());
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1505
const conflicts = fresh.some((range) => lockStart < Date.parse(range.end) && lockEnd > Date.parse(range.start));
const conflicts = fresh.some((range) => lockStart < Date.parse(range.end) && lockEnd > Date.parse(range.start));
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1506
if (conflicts) throw new Error('That time became busy in Google Calendar. Choose another slot.');
if (conflicts) throw new Error('That time became busy in Google Calendar. Choose another slot.');
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1507
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1508
const updated = await rescheduleCalendarEvent(env, settings, booking.google_event_id, {
const updated = await rescheduleCalendarEvent(env, settings, booking.google_event_id, {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1509
phone: booking.phone ?? undefined,
phone: booking.phone ?? undefined,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1510
message: booking.message ?? undefined,
message: booking.message ?? undefined,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1511
paid: booking.payment_status === 'paid',
paid: booking.payment_status === 'paid',
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1512
publicBookingId: booking.public_booking_id ?? undefined,
publicBookingId: booking.public_booking_id ?? undefined,
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1513
start: new Date(startMs).toISOString(),
start: new Date(startMs).toISOString(),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1514
end: new Date(endMs).toISOString(),
end: new Date(endMs).toISOString(),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1515
});
});
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1516
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1517
try {
try {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1518
await env.DB.batch([
await env.DB.batch([
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1519
env.DB.prepare(`
env.DB.prepare(`
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1520
UPDATE bookings
UPDATE bookings
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1521
SET start_time = ?1,
SET start_time = ?1,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1522
end_time = ?2,
end_time = ?2,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1523
meet_url = COALESCE(?3, meet_url),
meet_url = COALESCE(?3, meet_url),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1524
rescheduled_at = datetime('now'),
rescheduled_at = datetime('now'),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1525
reschedule_count = reschedule_count + 1,
reschedule_count = reschedule_count + 1,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1526
proposed_start_time = NULL,
proposed_start_time = NULL,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1527
proposed_end_time = NULL,
proposed_end_time = NULL,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1528
proposed_at = NULL,
proposed_at = NULL,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1529
proposal_status = NULL,
proposal_status = NULL,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1530
proposal_token_hash = NULL,
proposal_token_hash = NULL,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1531
calendar_sync_status = 'synced',
calendar_sync_status = 'synced',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1532
calendar_sync_error = NULL,
calendar_sync_error = NULL,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1533
calendar_sync_updated_at = datetime('now'),
calendar_sync_updated_at = datetime('now'),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1534
updated_at = datetime('now')
updated_at = datetime('now')
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1535
WHERE id = ?4 AND status = 'confirmed'
WHERE id = ?4 AND status = 'confirmed'
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1536
`).bind(new Date(startMs).toISOString(), new Date(endMs).toISOString(), updated.meetUrl, booking.id),
`).bind(new Date(startMs).toISOString(), new Date(endMs).toISOString(), updated.meetUrl, booking.id),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1537
env.DB.prepare('UPDATE slot_locks SET expires_at = ?1 WHERE booking_id = ?2')
env.DB.prepare('UPDATE slot_locks SET expires_at = ?1 WHERE booking_id = ?2')
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1538
.bind(Date.now() + 10 * 60_000, booking.id),
.bind(Date.now() + 10 * 60_000, booking.id),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1539
]);
]);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1540
} catch (error) {
} catch (error) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1541
await rescheduleCalendarEvent(env, settings, booking.google_event_id, {
await rescheduleCalendarEvent(env, settings, booking.google_event_id, {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1542
phone: booking.phone ?? undefined,
phone: booking.phone ?? undefined,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1543
message: booking.message ?? undefined,
message: booking.message ?? undefined,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1544
paid: booking.payment_status === 'paid',
paid: booking.payment_status === 'paid',
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1545
publicBookingId: booking.public_booking_id ?? undefined,
publicBookingId: booking.public_booking_id ?? undefined,
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1546
start: booking.start_time,
start: booking.start_time,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1547
end: booking.end_time,
end: booking.end_time,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1548
}).catch(() => undefined);
}).catch(() => undefined);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1549
throw error;
throw error;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1550
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1551
} catch (error) {
} catch (error) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1552
await env.DB.prepare('DELETE FROM slot_locks WHERE booking_id = ?1').bind(booking.id).run().catch(() => undefined);
await env.DB.prepare('DELETE FROM slot_locks WHERE booking_id = ?1').bind(booking.id).run().catch(() => undefined);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1553
throw error;
throw error;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1554
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1555
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1556
const result = await paymentBookingById(env, booking.id);
const result = await paymentBookingById(env, booking.id);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1557
if (!result) throw new Error('Rescheduled booking record was not found.');
if (!result) throw new Error('Rescheduled booking record was not found.');
Alex Nord
about 16 hours ago
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1558
await logActivity(env, booking.id, source === 'guest_suggestion' ? 'time_suggestion_accepted' : 'booking_rescheduled', {
await logActivity(env, booking.id, source === 'guest_suggestion' ? 'time_suggestion_accepted' : 'booking_rescheduled', {
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1559
source,
source,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1560
oldStart: booking.start_time,
oldStart: booking.start_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1561
oldEnd: booking.end_time,
oldEnd: booking.end_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1562
newStart: result.start_time,
newStart: result.start_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1563
newEnd: result.end_time,
newEnd: result.end_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1564
duration: booking.duration_minutes,
duration: booking.duration_minutes,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1565
}, `booking:${booking.id}:reschedule:${result.reschedule_count}`);
}, `booking:${booking.id}:reschedule:${result.reschedule_count}`);
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1566
return result;
return result;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1567
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1568
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1569
async function adminRescheduleBooking(env: Env, bookingId: string, start: string): Promise<Response> {
async function adminRescheduleBooking(env: Env, bookingId: string, start: string): Promise<Response> {
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1570
if (!/^[0-9a-f-]{36}$/i.test(bookingId)) return json({ error: 'Invalid booking id.' }, 400);
if (!/^[0-9a-f-]{36}$/i.test(bookingId)) return json({ error: 'Invalid booking id.' }, 400);
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1571
const booking = await paymentBookingById(env, bookingId);
const booking = await paymentBookingById(env, bookingId);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1572
if (!booking) return json({ error: 'Booking not found.' }, 404);
if (!booking) return json({ error: 'Booking not found.' }, 404);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1573
try {
try {
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1574
const updated = await rescheduleConfirmedBooking(env, booking, start, 'admin');
const updated = await rescheduleConfirmedBooking(env, booking, start, 'admin');
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1575
return json({ ok: true, booking: publicConfirmation(updated) });
return json({ ok: true, booking: publicConfirmation(updated) });
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1576
} catch (error) {
} catch (error) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1577
if (error instanceof GoogleCalendarError) return json({ error: error.publicMessage }, 502);
if (error instanceof GoogleCalendarError) return json({ error: error.publicMessage }, 502);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1578
return json({ error: errorMessage(error) }, /available|busy|future|took/i.test(errorMessage(error)) ? 409 : 400);
return json({ error: errorMessage(error) }, /available|busy|future|took/i.test(errorMessage(error)) ? 409 : 400);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1579
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1580
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1581
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1582
async function adminSuggestNewTime(env: Env, bookingId: string, start: string): Promise<Response> {
async function adminSuggestNewTime(env: Env, bookingId: string, start: string): Promise<Response> {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1583
if (!/^[0-9a-f-]{36}$/i.test(bookingId)) return json({ error: 'Invalid booking id.' }, 400);
if (!/^[0-9a-f-]{36}$/i.test(bookingId)) return json({ error: 'Invalid booking id.' }, 400);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1584
const booking = await paymentBookingById(env, bookingId);
const booking = await paymentBookingById(env, bookingId);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1585
if (!booking) return json({ error: 'Booking not found.' }, 404);
if (!booking) return json({ error: 'Booking not found.' }, 404);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1586
if (booking.status !== 'confirmed') return json({ error: 'Only confirmed bookings can receive a new-time suggestion.' }, 409);
if (booking.status !== 'confirmed') return json({ error: 'Only confirmed bookings can receive a new-time suggestion.' }, 409);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1587
if (!booking.google_event_id) return json({ error: 'This booking is missing its Google Calendar event.' }, 409);
if (!booking.google_event_id) return json({ error: 'This booking is missing its Google Calendar event.' }, 409);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1588
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1589
try {
try {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1590
const { settings, startMs, endMs } = await assertRescheduleSlotAvailable(env, booking, start);
const { settings, startMs, endMs } = await assertRescheduleSlotAvailable(env, booking, start);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1591
const token = randomUrlToken();
const token = randomUrlToken();
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1592
const tokenHash = await sha256Base64Url(token);
const tokenHash = await sha256Base64Url(token);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1593
const suggestionUrl = `${env.APP_URL.replace(/\/+$/, '')}/reschedule/${encodeURIComponent(token)}`;
const suggestionUrl = `${env.APP_URL.replace(/\/+$/, '')}/reschedule/${encodeURIComponent(token)}`;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1594
await env.DB.prepare(`
await env.DB.prepare(`
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1595
UPDATE bookings
UPDATE bookings
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1596
SET proposed_start_time = ?1,
SET proposed_start_time = ?1,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1597
proposed_end_time = ?2,
proposed_end_time = ?2,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1598
proposed_at = datetime('now'),
proposed_at = datetime('now'),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1599
proposal_status = 'pending',
proposal_status = 'pending',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1600
proposal_token_hash = ?3,
proposal_token_hash = ?3,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1601
updated_at = datetime('now')
updated_at = datetime('now')
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1602
WHERE id = ?4 AND status = 'confirmed'
WHERE id = ?4 AND status = 'confirmed'
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1603
`).bind(new Date(startMs).toISOString(), new Date(endMs).toISOString(), tokenHash, booking.id).run();
`).bind(new Date(startMs).toISOString(), new Date(endMs).toISOString(), tokenHash, booking.id).run();
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1604
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1605
try {
try {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1606
await sendRescheduleSuggestion(env, settings, booking.google_event_id, {
await sendRescheduleSuggestion(env, settings, booking.google_event_id, {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1607
phone: booking.phone ?? undefined,
phone: booking.phone ?? undefined,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1608
message: booking.message ?? undefined,
message: booking.message ?? undefined,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1609
paid: booking.payment_status === 'paid',
paid: booking.payment_status === 'paid',
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1610
publicBookingId: booking.public_booking_id ?? undefined,
publicBookingId: booking.public_booking_id ?? undefined,
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1611
}, {
}, {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1612
start: new Date(startMs).toISOString(),
start: new Date(startMs).toISOString(),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1613
end: new Date(endMs).toISOString(),
end: new Date(endMs).toISOString(),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1614
url: suggestionUrl,
url: suggestionUrl,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1615
});
});
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1616
} catch (error) {
} catch (error) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1617
await env.DB.prepare(`
await env.DB.prepare(`
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1618
UPDATE bookings
UPDATE bookings
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1619
SET proposed_start_time = NULL, proposed_end_time = NULL, proposed_at = NULL,
SET proposed_start_time = NULL, proposed_end_time = NULL, proposed_at = NULL,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1620
proposal_status = NULL, proposal_token_hash = NULL, updated_at = datetime('now')
proposal_status = NULL, proposal_token_hash = NULL, updated_at = datetime('now')
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1621
WHERE id = ?1
WHERE id = ?1
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1622
`).bind(booking.id).run().catch(() => undefined);
`).bind(booking.id).run().catch(() => undefined);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1623
throw error;
throw error;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1624
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1625
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1626
await logActivity(env, booking.id, 'time_suggested', {
await logActivity(env, booking.id, 'time_suggested', {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1627
currentStart: booking.start_time,
currentStart: booking.start_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1628
currentEnd: booking.end_time,
currentEnd: booking.end_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1629
proposedStart: new Date(startMs).toISOString(),
proposedStart: new Date(startMs).toISOString(),
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1630
proposedEnd: new Date(endMs).toISOString(),
proposedEnd: new Date(endMs).toISOString(),
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1631
duration: booking.duration_minutes,
duration: booking.duration_minutes,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1632
}, `suggest:${tokenHash}`);
}, `suggest:${tokenHash}`);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1633
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1634
return json({
return json({
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1635
ok: true,
ok: true,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1636
suggestionUrl,
suggestionUrl,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1637
proposedStart: new Date(startMs).toISOString(),
proposedStart: new Date(startMs).toISOString(),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1638
proposedEnd: new Date(endMs).toISOString(),
proposedEnd: new Date(endMs).toISOString(),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1639
});
});
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1640
} catch (error) {
} catch (error) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1641
if (error instanceof GoogleCalendarError) return json({ error: error.publicMessage }, 502);
if (error instanceof GoogleCalendarError) return json({ error: error.publicMessage }, 502);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1642
return json({ error: errorMessage(error) }, /available|busy|future/i.test(errorMessage(error)) ? 409 : 400);
return json({ error: errorMessage(error) }, /available|busy|future/i.test(errorMessage(error)) ? 409 : 400);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1643
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1644
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1645
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1646
async function proposalBookingByToken(env: Env, token: string): Promise<PaymentBookingRow | null> {
async function proposalBookingByToken(env: Env, token: string): Promise<PaymentBookingRow | null> {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1647
if (!/^[A-Za-z0-9_-]{20,200}$/.test(token)) return null;
if (!/^[A-Za-z0-9_-]{20,200}$/.test(token)) return null;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1648
const hash = await sha256Base64Url(token);
const hash = await sha256Base64Url(token);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1649
return env.DB.prepare(`
return env.DB.prepare(`
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1650
SELECT id, public_booking_id, name, email, phone, message, start_time, end_time, duration_minutes,
SELECT id, public_booking_id, name, email, phone, message, start_time, end_time, duration_minutes,
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1651
timezone, meeting_mode, status, google_event_id, meet_url, payment_status,
timezone, meeting_mode, status, google_event_id, meet_url, payment_status,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1652
payment_amount, payment_currency, stripe_checkout_session_id, stripe_payment_intent_id, paid_at,
payment_amount, payment_currency, stripe_checkout_session_id, stripe_payment_intent_id, paid_at,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1653
rescheduled_at, reschedule_count, proposed_start_time, proposed_end_time, proposed_at,
rescheduled_at, reschedule_count, proposed_start_time, proposed_end_time, proposed_at,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1654
proposal_status, proposal_token_hash, refund_status, stripe_refund_id, refunded_amount,
proposal_status, proposal_token_hash, refund_status, stripe_refund_id, refunded_amount,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1655
refunded_at, updated_at
refunded_at, updated_at
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1656
FROM bookings
FROM bookings
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1657
WHERE proposal_token_hash = ?1
WHERE proposal_token_hash = ?1
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1658
AND proposal_status = 'pending'
AND proposal_status = 'pending'
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1659
`).bind(hash).first<PaymentBookingRow>();
`).bind(hash).first<PaymentBookingRow>();
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1660
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1661
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1662
async function getRescheduleProposal(env: Env, token: string): Promise<Response> {
async function getRescheduleProposal(env: Env, token: string): Promise<Response> {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1663
const booking = await proposalBookingByToken(env, token);
const booking = await proposalBookingByToken(env, token);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1664
if (!booking || !booking.proposed_start_time || !booking.proposed_end_time) {
if (!booking || !booking.proposed_start_time || !booking.proposed_end_time) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1665
return json({ error: 'This reschedule suggestion is invalid or no longer active.' }, 404);
return json({ error: 'This reschedule suggestion is invalid or no longer active.' }, 404);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1666
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1667
const settings = await getSettings(env);
const settings = await getSettings(env);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1668
return json({
return json({
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1669
title: settings.title,
title: settings.title,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1670
name: booking.name,
name: booking.name,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1671
currentStart: booking.start_time,
currentStart: booking.start_time,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1672
currentEnd: booking.end_time,
currentEnd: booking.end_time,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1673
proposedStart: booking.proposed_start_time,
proposedStart: booking.proposed_start_time,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1674
proposedEnd: booking.proposed_end_time,
proposedEnd: booking.proposed_end_time,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1675
duration: booking.duration_minutes,
duration: booking.duration_minutes,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1676
timezone: booking.timezone,
timezone: booking.timezone,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1677
meetingMode: booking.meeting_mode,
meetingMode: booking.meeting_mode,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1678
});
});
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1679
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1680
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1681
async function acceptRescheduleProposal(env: Env, token: string): Promise<Response> {
async function acceptRescheduleProposal(env: Env, token: string): Promise<Response> {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1682
const booking = await proposalBookingByToken(env, token);
const booking = await proposalBookingByToken(env, token);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1683
if (!booking || !booking.proposed_start_time) {
if (!booking || !booking.proposed_start_time) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1684
return json({ error: 'This reschedule suggestion is invalid or no longer active.' }, 404);
return json({ error: 'This reschedule suggestion is invalid or no longer active.' }, 404);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1685
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1686
try {
try {
Alex Nord
about 16 hours ago
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1687
const updated = await rescheduleConfirmedBooking(env, booking, booking.proposed_start_time, 'guest_suggestion');
const updated = await rescheduleConfirmedBooking(env, booking, booking.proposed_start_time, 'guest_suggestion');
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1688
return json({ ok: true, booking: publicConfirmation(updated) });
return json({ ok: true, booking: publicConfirmation(updated) });
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1689
} catch (error) {
} catch (error) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1690
if (error instanceof GoogleCalendarError) return json({ error: error.publicMessage }, 502);
if (error instanceof GoogleCalendarError) return json({ error: error.publicMessage }, 502);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1691
return json({ error: errorMessage(error) }, /available|busy|future|took/i.test(errorMessage(error)) ? 409 : 400);
return json({ error: errorMessage(error) }, /available|busy|future|took/i.test(errorMessage(error)) ? 409 : 400);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1692
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1693
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1694
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1695
async function cancelBooking(env: Env, bookingId: string, allowStaleStripeRelease = false): Promise<Response> {
async function cancelBooking(env: Env, bookingId: string, allowStaleStripeRelease = false): Promise<Response> {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1696
if (!/^[0-9a-f-]{36}$/i.test(bookingId)) return json({ error: 'Invalid booking id.' }, 400);
if (!/^[0-9a-f-]{36}$/i.test(bookingId)) return json({ error: 'Invalid booking id.' }, 400);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1697
const booking = await paymentBookingById(env, bookingId);
const booking = await paymentBookingById(env, bookingId);
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1698
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1699
if (!booking) return json({ error: 'Booking not found.' }, 404);
if (!booking) return json({ error: 'Booking not found.' }, 404);
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1700
if (booking.status === 'cancelled') {
if (booking.status === 'cancelled') {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1701
return json({
return json({
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1702
ok: true,
ok: true,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1703
refunded: booking.refund_status === 'succeeded' || booking.refund_status === 'pending',
refunded: booking.refund_status === 'succeeded' || booking.refund_status === 'pending',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1704
refundStatus: booking.refund_status,
refundStatus: booking.refund_status,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1705
});
});
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1706
}
}
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1707
if (booking.status === 'pending' && booking.payment_status !== 'not_requested') {
if (booking.status === 'pending' && booking.payment_status !== 'not_requested') {
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1708
return cancelPendingPayment(env, bookingId, { allowStaleStripeRelease });
return cancelPendingPayment(env, bookingId, { allowStaleStripeRelease });
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1709
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1710
if (booking.status !== 'confirmed') return json({ error: 'Only confirmed bookings or pending payment holds can be cancelled.' }, 409);
if (booking.status !== 'confirmed') return json({ error: 'Only confirmed bookings or pending payment holds can be cancelled.' }, 409);
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1711
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1712
let refundStatus = booking.refund_status;
let refundStatus = booking.refund_status;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1713
let refunded = refundStatus === 'succeeded' || refundStatus === 'pending';
let refunded = refundStatus === 'succeeded' || refundStatus === 'pending';
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1714
let refundWarning: string | null = null;
let refundWarning: string | null = null;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1715
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1716
if (booking.payment_status === 'paid' && !refunded) {
if (booking.payment_status === 'paid' && !refunded) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1717
if (!stripeConfigured(env)) {
if (!stripeConfigured(env)) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1718
return json({ error: 'This booking was paid, but Stripe is not configured. Slot will not cancel it without attempting the refund.' }, 503);
return json({ error: 'This booking was paid, but Stripe is not configured. Slot will not cancel it without attempting the refund.' }, 503);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1719
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1720
const sessionMode = stripeCheckoutSessionMode(booking.stripe_checkout_session_id);
const sessionMode = stripeCheckoutSessionMode(booking.stripe_checkout_session_id);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1721
const configuredMode = stripeMode(env);
const configuredMode = stripeMode(env);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1722
if (sessionMode !== 'unknown' && configuredMode !== 'unknown' && sessionMode !== configuredMode) {
if (sessionMode !== 'unknown' && configuredMode !== 'unknown' && sessionMode !== configuredMode) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1723
return json({
return json({
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1724
error: `This booking was paid in Stripe ${sessionMode} mode, but Slot is currently using ${configuredMode} mode. Switch to the ${sessionMode} Stripe key before cancelling so Slot can refund the payment.`,
error: `This booking was paid in Stripe ${sessionMode} mode, but Slot is currently using ${configuredMode} mode. Switch to the ${sessionMode} Stripe key before cancelling so Slot can refund the payment.`,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1725
code: 'stripe_mode_mismatch',
code: 'stripe_mode_mismatch',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1726
}, 409);
}, 409);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1727
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1728
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1729
let paymentIntentId = booking.stripe_payment_intent_id;
let paymentIntentId = booking.stripe_payment_intent_id;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1730
if (!paymentIntentId && booking.stripe_checkout_session_id) {
if (!paymentIntentId && booking.stripe_checkout_session_id) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1731
try {
try {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1732
const session = await retrieveStripeCheckoutSession(env, booking.stripe_checkout_session_id);
const session = await retrieveStripeCheckoutSession(env, booking.stripe_checkout_session_id);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1733
paymentIntentId = stripePaymentIntentId(session);
paymentIntentId = stripePaymentIntentId(session);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1734
if (paymentIntentId) {
if (paymentIntentId) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1735
await env.DB.prepare(`
await env.DB.prepare(`
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1736
UPDATE bookings
UPDATE bookings
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1737
SET stripe_payment_intent_id = ?1, updated_at = datetime('now')
SET stripe_payment_intent_id = ?1, updated_at = datetime('now')
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1738
WHERE id = ?2
WHERE id = ?2
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1739
`).bind(paymentIntentId, booking.id).run();
`).bind(paymentIntentId, booking.id).run();
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1740
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1741
} catch (error) {
} catch (error) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1742
if (error instanceof StripeError) return json({ error: error.message }, error.status);
if (error instanceof StripeError) return json({ error: error.message }, error.status);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1743
throw error;
throw error;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1744
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1745
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1746
if (!paymentIntentId) {
if (!paymentIntentId) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1747
return json({ error: 'This paid booking is missing its Stripe PaymentIntent, so Slot cannot safely refund it.' }, 409);
return json({ error: 'This paid booking is missing its Stripe PaymentIntent, so Slot cannot safely refund it.' }, 409);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1748
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1749
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1750
try {
try {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1751
const refund = await createStripeRefund(env, paymentIntentId, booking.id);
const refund = await createStripeRefund(env, paymentIntentId, booking.id);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1752
refundStatus = refund.status ?? 'pending';
refundStatus = refund.status ?? 'pending';
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1753
if (refundStatus === 'failed' || refundStatus === 'canceled' || refundStatus === 'requires_action') {
if (refundStatus === 'failed' || refundStatus === 'canceled' || refundStatus === 'requires_action') {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1754
await env.DB.prepare(`
await env.DB.prepare(`
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1755
UPDATE bookings
UPDATE bookings
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1756
SET refund_status = ?1,
SET refund_status = ?1,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1757
stripe_refund_id = ?2,
stripe_refund_id = ?2,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1758
refunded_amount = ?3,
refunded_amount = ?3,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1759
updated_at = datetime('now')
updated_at = datetime('now')
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1760
WHERE id = ?4
WHERE id = ?4
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1761
`).bind(refundStatus, refund.id, refund.amount, booking.id).run();
`).bind(refundStatus, refund.id, refund.amount, booking.id).run();
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1762
await logActivity(env, booking.id, 'refund_failed', {
await logActivity(env, booking.id, 'refund_failed', {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1763
amount: refund.amount,
amount: refund.amount,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1764
currency: booking.payment_currency,
currency: booking.payment_currency,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1765
refundStatus,
refundStatus,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1766
}, `refund:${refund.id}:${refundStatus}`);
}, `refund:${refund.id}:${refundStatus}`);
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1767
return json({ error: `Stripe created refund ${refund.id}, but its status is ${refundStatus}. The booking has not been cancelled.` }, 502);
return json({ error: `Stripe created refund ${refund.id}, but its status is ${refundStatus}. The booking has not been cancelled.` }, 502);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1768
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1769
refunded = true;
refunded = true;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1770
await env.DB.prepare(`
await env.DB.prepare(`
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1771
UPDATE bookings
UPDATE bookings
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1772
SET refund_status = ?1,
SET refund_status = ?1,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1773
stripe_refund_id = ?2,
stripe_refund_id = ?2,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1774
refunded_amount = ?3,
refunded_amount = ?3,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1775
refunded_at = CASE WHEN ?1 = 'succeeded' THEN datetime('now') ELSE refunded_at END,
refunded_at = CASE WHEN ?1 = 'succeeded' THEN datetime('now') ELSE refunded_at END,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1776
updated_at = datetime('now')
updated_at = datetime('now')
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1777
WHERE id = ?4
WHERE id = ?4
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1778
`).bind(refundStatus, refund.id, refund.amount, booking.id).run();
`).bind(refundStatus, refund.id, refund.amount, booking.id).run();
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1779
await logActivity(env, booking.id, refundStatus === 'succeeded' ? 'refund_succeeded' : 'refund_started', {
await logActivity(env, booking.id, refundStatus === 'succeeded' ? 'refund_succeeded' : 'refund_started', {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1780
amount: refund.amount,
amount: refund.amount,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1781
currency: booking.payment_currency,
currency: booking.payment_currency,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1782
refundStatus,
refundStatus,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1783
}, `refund:${refund.id}:${refundStatus}`);
}, `refund:${refund.id}:${refundStatus}`);
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1784
if (refundStatus === 'pending') {
if (refundStatus === 'pending') {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1785
refundWarning = 'Stripe accepted the refund, but it is still pending.';
refundWarning = 'Stripe accepted the refund, but it is still pending.';
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1786
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1787
} catch (error) {
} catch (error) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1788
if (error instanceof StripeError) return json({ error: `Stripe refund failed: ${error.message}` }, error.status);
if (error instanceof StripeError) return json({ error: `Stripe refund failed: ${error.message}` }, error.status);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1789
throw error;
throw error;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1790
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1791
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1792
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1793
const settings = await getSettings(env);
const settings = await getSettings(env);
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1794
let calendarWarning: string | null = null;
let calendarWarning: string | null = null;
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1795
try {
try {
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1796
if (booking.google_event_id) await deleteCalendarEvent(env, settings, booking.google_event_id);
if (booking.google_event_id) await deleteCalendarEvent(env, settings, booking.google_event_id);
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1797
} catch (error) {
} catch (error) {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1798
const message = privateCalendarError(error);
const message = privateCalendarError(error);
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1799
if (!refunded) {
if (!refunded) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1800
await env.DB.prepare(`
await env.DB.prepare(`
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1801
UPDATE bookings
UPDATE bookings
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1802
SET calendar_sync_status = 'failed',
SET calendar_sync_status = 'failed',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1803
calendar_sync_error = ?1,
calendar_sync_error = ?1,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1804
calendar_sync_updated_at = datetime('now'),
calendar_sync_updated_at = datetime('now'),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1805
updated_at = datetime('now')
updated_at = datetime('now')
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1806
WHERE id = ?2
WHERE id = ?2
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1807
`).bind(message, bookingId).run();
`).bind(message, bookingId).run();
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1808
return json({ error: 'Slot could not cancel the Google Calendar event. The booking has not been cancelled.' }, 502);
return json({ error: 'Slot could not cancel the Google Calendar event. The booking has not been cancelled.' }, 502);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1809
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1810
calendarWarning = 'The Stripe refund was created, but Google Calendar could not be updated. Remove the calendar event manually.';
calendarWarning = 'The Stripe refund was created, but Google Calendar could not be updated. Remove the calendar event manually.';
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1811
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1812
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1813
await env.DB.batch([
await env.DB.batch([
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1814
env.DB.prepare(`
env.DB.prepare(`
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1815
UPDATE bookings
UPDATE bookings
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1816
SET status = 'cancelled',
SET status = 'cancelled',
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1817
cancelled_at = datetime('now'),
cancelled_at = datetime('now'),
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1818
proposed_start_time = NULL,
proposed_start_time = NULL,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1819
proposed_end_time = NULL,
proposed_end_time = NULL,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1820
proposed_at = NULL,
proposed_at = NULL,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1821
proposal_status = NULL,
proposal_status = NULL,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1822
proposal_token_hash = NULL,
proposal_token_hash = NULL,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1823
calendar_sync_status = ?1,
calendar_sync_status = ?1,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1824
calendar_sync_error = ?2,
calendar_sync_error = ?2,
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1825
calendar_sync_updated_at = datetime('now'),
calendar_sync_updated_at = datetime('now'),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1826
updated_at = datetime('now')
updated_at = datetime('now')
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1827
WHERE id = ?3
WHERE id = ?3
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1828
`).bind(calendarWarning ? 'failed' : 'synced', calendarWarning, bookingId),
`).bind(calendarWarning ? 'failed' : 'synced', calendarWarning, bookingId),
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1829
env.DB.prepare('DELETE FROM slot_locks WHERE booking_id = ?1').bind(bookingId),
env.DB.prepare('DELETE FROM slot_locks WHERE booking_id = ?1').bind(bookingId),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1830
]);
]);
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1831
await logActivity(env, bookingId, 'booking_cancelled', {
await logActivity(env, bookingId, 'booking_cancelled', {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1832
start: booking.start_time,
start: booking.start_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1833
end: booking.end_time,
end: booking.end_time,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1834
duration: booking.duration_minutes,
duration: booking.duration_minutes,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1835
refunded,
refunded,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1836
refundStatus,
refundStatus,
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1837
}, `booking:${bookingId}:cancelled`);
}, `booking:${bookingId}:cancelled`);
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1838
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1839
return json({
return json({
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1840
ok: true,
ok: true,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1841
refunded,
refunded,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1842
refundStatus,
refundStatus,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1843
warning: [refundWarning, calendarWarning].filter(Boolean).join(' ') || undefined,
warning: [refundWarning, calendarWarning].filter(Boolean).join(' ') || undefined,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 1844
});
});
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1845
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1846
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1847
async function publicCancelBooking(request: Request, env: Env, value: unknown): Promise<Response> {
async function publicCancelBooking(request: Request, env: Env, value: unknown): Promise<Response> {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1848
if (!(await enforceCancellationRateLimit(request, env))) {
if (!(await enforceCancellationRateLimit(request, env))) {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1849
return json({ error: 'Too many cancellation attempts. Try again later.' }, 429);
return json({ error: 'Too many cancellation attempts. Try again later.' }, 429);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1850
}
}
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1851
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1852
const publicBookingId = normalizePublicBookingId(value);
const publicBookingId = normalizePublicBookingId(value);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1853
if (!publicBookingId) return json({ error: 'Enter a valid Slot booking ID.' }, 400);
if (!publicBookingId) return json({ error: 'Enter a valid Slot booking ID.' }, 400);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1854
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1855
const row = await env.DB.prepare(`
const row = await env.DB.prepare(`
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1856
SELECT id, status, end_time
SELECT id, status, end_time
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1857
FROM bookings
FROM bookings
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1858
WHERE public_booking_id = ?1
WHERE public_booking_id = ?1
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1859
`).bind(publicBookingId).first<{ id: string; status: string; end_time: string }>();
`).bind(publicBookingId).first<{ id: string; status: string; end_time: string }>();
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1860
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1861
if (!row) return json({ error: 'Booking ID not found.' }, 404);
if (!row) return json({ error: 'Booking ID not found.' }, 404);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1862
if (row.status === 'cancelled') return json({ ok: true, alreadyCancelled: true });
if (row.status === 'cancelled') return json({ ok: true, alreadyCancelled: true });
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1863
if (row.status !== 'confirmed') return json({ error: 'This booking is not currently confirmed.' }, 409);
if (row.status !== 'confirmed') return json({ error: 'This booking is not currently confirmed.' }, 409);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1864
if (Date.parse(row.end_time) <= Date.now()) return json({ error: 'Past bookings cannot be cancelled.' }, 409);
if (Date.parse(row.end_time) <= Date.now()) return json({ error: 'Past bookings cannot be cancelled.' }, 409);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1865
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1866
return cancelBooking(env, row.id);
return cancelBooking(env, row.id);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1867
}
}
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 1868
Alex Nord
about 16 hours ago
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1869
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1870
async function publicManageBooking(request: Request, env: Env, value: unknown): Promise<Response> {
async function publicManageBooking(request: Request, env: Env, value: unknown): Promise<Response> {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1871
if (!(await enforceManageRateLimit(request, env))) {
if (!(await enforceManageRateLimit(request, env))) {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1872
return json({ error: 'Too many booking management attempts. Try again later.' }, 429);
return json({ error: 'Too many booking management attempts. Try again later.' }, 429);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1873
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1874
const publicBookingId = normalizePublicBookingId(value);
const publicBookingId = normalizePublicBookingId(value);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1875
if (!publicBookingId) return json({ error: 'Enter a valid Slot booking ID.' }, 400);
if (!publicBookingId) return json({ error: 'Enter a valid Slot booking ID.' }, 400);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1876
const booking = await bookingByPublicId(env, publicBookingId);
const booking = await bookingByPublicId(env, publicBookingId);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1877
if (!booking) return json({ error: 'Booking ID not found.' }, 404);
if (!booking) return json({ error: 'Booking ID not found.' }, 404);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1878
return json({ booking: publicManagePayload(booking) });
return json({ booking: publicManagePayload(booking) });
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1879
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1880
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1881
async function publicManageAvailability(
async function publicManageAvailability(
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1882
request: Request,
request: Request,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1883
env: Env,
env: Env,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1884
value: unknown,
value: unknown,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1885
date: unknown,
date: unknown,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1886
): Promise<Response> {
): Promise<Response> {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1887
if (!(await enforceManageRateLimit(request, env))) {
if (!(await enforceManageRateLimit(request, env))) {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1888
return json({ error: 'Too many booking management attempts. Try again later.' }, 429);
return json({ error: 'Too many booking management attempts. Try again later.' }, 429);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1889
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1890
const publicBookingId = normalizePublicBookingId(value);
const publicBookingId = normalizePublicBookingId(value);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1891
if (!publicBookingId) return json({ error: 'Enter a valid Slot booking ID.' }, 400);
if (!publicBookingId) return json({ error: 'Enter a valid Slot booking ID.' }, 400);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1892
const booking = await bookingByPublicId(env, publicBookingId);
const booking = await bookingByPublicId(env, publicBookingId);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1893
if (!booking) return json({ error: 'Booking ID not found.' }, 404);
if (!booking) return json({ error: 'Booking ID not found.' }, 404);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1894
if (booking.status !== 'confirmed' || Date.parse(booking.end_time) <= Date.now()) {
if (booking.status !== 'confirmed' || Date.parse(booking.end_time) <= Date.now()) {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1895
return json({ error: 'Only upcoming confirmed bookings can be rescheduled.' }, 409);
return json({ error: 'Only upcoming confirmed bookings can be rescheduled.' }, 409);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1896
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1897
const dateKey = String(date ?? '').trim();
const dateKey = String(date ?? '').trim();
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1898
try {
try {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1899
const availability = await computeAvailability(env, dateKey);
const availability = await computeAvailability(env, dateKey);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1900
const slots = availability.slots
const slots = availability.slots
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1901
.filter((slot) => slot.durations.includes(booking.duration_minutes))
.filter((slot) => slot.durations.includes(booking.duration_minutes))
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1902
.map((slot) => ({ start: slot.start, time: slot.time }));
.map((slot) => ({ start: slot.start, time: slot.time }));
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1903
return json({ date: dateKey, timezone: availability.settings.timezone, duration: booking.duration_minutes, slots });
return json({ date: dateKey, timezone: availability.settings.timezone, duration: booking.duration_minutes, slots });
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1904
} catch (error) {
} catch (error) {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1905
if (error instanceof GoogleCalendarError) return json({ error: error.publicMessage }, 502);
if (error instanceof GoogleCalendarError) return json({ error: error.publicMessage }, 502);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1906
return json({ error: errorMessage(error) }, 400);
return json({ error: errorMessage(error) }, 400);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1907
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1908
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1909
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1910
async function publicRescheduleBooking(
async function publicRescheduleBooking(
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1911
request: Request,
request: Request,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1912
env: Env,
env: Env,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1913
value: unknown,
value: unknown,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1914
start: unknown,
start: unknown,
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1915
): Promise<Response> {
): Promise<Response> {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1916
if (!(await enforceManageRateLimit(request, env))) {
if (!(await enforceManageRateLimit(request, env))) {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1917
return json({ error: 'Too many booking management attempts. Try again later.' }, 429);
return json({ error: 'Too many booking management attempts. Try again later.' }, 429);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1918
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1919
const publicBookingId = normalizePublicBookingId(value);
const publicBookingId = normalizePublicBookingId(value);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1920
if (!publicBookingId) return json({ error: 'Enter a valid Slot booking ID.' }, 400);
if (!publicBookingId) return json({ error: 'Enter a valid Slot booking ID.' }, 400);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1921
const booking = await bookingByPublicId(env, publicBookingId);
const booking = await bookingByPublicId(env, publicBookingId);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1922
if (!booking) return json({ error: 'Booking ID not found.' }, 404);
if (!booking) return json({ error: 'Booking ID not found.' }, 404);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1923
if (booking.status !== 'confirmed' || Date.parse(booking.end_time) <= Date.now()) {
if (booking.status !== 'confirmed' || Date.parse(booking.end_time) <= Date.now()) {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1924
return json({ error: 'Only upcoming confirmed bookings can be rescheduled.' }, 409);
return json({ error: 'Only upcoming confirmed bookings can be rescheduled.' }, 409);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1925
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1926
try {
try {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1927
const updated = await rescheduleConfirmedBooking(env, booking, String(start ?? ''), 'guest_self');
const updated = await rescheduleConfirmedBooking(env, booking, String(start ?? ''), 'guest_self');
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1928
return json({ ok: true, booking: publicManagePayload(updated) });
return json({ ok: true, booking: publicManagePayload(updated) });
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1929
} catch (error) {
} catch (error) {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1930
if (error instanceof GoogleCalendarError) return json({ error: error.publicMessage }, 502);
if (error instanceof GoogleCalendarError) return json({ error: error.publicMessage }, 502);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1931
const message = errorMessage(error);
const message = errorMessage(error);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1932
return json({ error: message }, /available|busy|future|took/i.test(message) ? 409 : 400);
return json({ error: message }, /available|busy|future|took/i.test(message) ? 409 : 400);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1933
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1934
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 1935
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1936
function cleanLabel(value: unknown): string | null {
function cleanLabel(value: unknown): string | null {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1937
const label = String(value ?? '').trim().slice(0, 80);
const label = String(value ?? '').trim().slice(0, 80);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1938
return label || null;
return label || null;
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1939
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1940
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1941
async function listAvailabilityRules(env: Env): Promise<Response> {
async function listAvailabilityRules(env: Env): Promise<Response> {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1942
const recurring = await env.DB.prepare(`
const recurring = await env.DB.prepare(`
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1943
SELECT id, weekdays, start_time, end_time, label
SELECT id, weekdays, start_time, end_time, label
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1944
FROM recurring_unavailable_periods
FROM recurring_unavailable_periods
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1945
ORDER BY start_time
ORDER BY start_time
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1946
`).all<{ id: string; weekdays: string; start_time: string; end_time: string; label: string | null }>();
`).all<{ id: string; weekdays: string; start_time: string; end_time: string; label: string | null }>();
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1947
const blocks = await env.DB.prepare(`
const blocks = await env.DB.prepare(`
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1948
SELECT id, date, start_time, end_time, all_day, label
SELECT id, date, start_time, end_time, all_day, label
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1949
FROM availability_blocks
FROM availability_blocks
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1950
ORDER BY date DESC, all_day DESC, start_time
ORDER BY date DESC, all_day DESC, start_time
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1951
LIMIT 100
LIMIT 100
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1952
`).all<{ id: string; date: string; start_time: string | null; end_time: string | null; all_day: number; label: string | null }>();
`).all<{ id: string; date: string; start_time: string | null; end_time: string | null; all_day: number; label: string | null }>();
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1953
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1954
return json({
return json({
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1955
recurring: (recurring.results ?? []).map((row) => ({
recurring: (recurring.results ?? []).map((row) => ({
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1956
id: row.id,
id: row.id,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1957
weekdays: row.weekdays.split(',').map(Number).filter((day) => day >= 0 && day <= 6),
weekdays: row.weekdays.split(',').map(Number).filter((day) => day >= 0 && day <= 6),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1958
start: row.start_time,
start: row.start_time,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1959
end: row.end_time,
end: row.end_time,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1960
label: row.label,
label: row.label,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1961
})),
})),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1962
blocks: (blocks.results ?? []).map((row) => ({
blocks: (blocks.results ?? []).map((row) => ({
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1963
id: row.id,
id: row.id,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1964
date: row.date,
date: row.date,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1965
start: row.start_time,
start: row.start_time,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1966
end: row.end_time,
end: row.end_time,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1967
allDay: row.all_day === 1,
allDay: row.all_day === 1,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1968
label: row.label,
label: row.label,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1969
})),
})),
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1970
});
});
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1971
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1972
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1973
async function createRecurringUnavailable(env: Env, input: unknown): Promise<Response> {
async function createRecurringUnavailable(env: Env, input: unknown): Promise<Response> {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1974
const raw = input as Partial<{ weekdays: unknown[]; start: string; end: string; label: string }>;
const raw = input as Partial<{ weekdays: unknown[]; start: string; end: string; label: string }>;
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1975
const weekdays = Array.isArray(raw.weekdays)
const weekdays = Array.isArray(raw.weekdays)
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1976
? [...new Set(raw.weekdays.map(Number).filter((day) => Number.isInteger(day) && day >= 0 && day <= 6))].sort((a, b) => a - b)
? [...new Set(raw.weekdays.map(Number).filter((day) => Number.isInteger(day) && day >= 0 && day <= 6))].sort((a, b) => a - b)
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1977
: [];
: [];
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1978
const start = String(raw.start ?? '');
const start = String(raw.start ?? '');
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1979
const end = String(raw.end ?? '');
const end = String(raw.end ?? '');
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1980
if (!weekdays.length || !isTime(start) || !isTime(end) || timeToMinutes(end) <= timeToMinutes(start)) {
if (!weekdays.length || !isTime(start) || !isTime(end) || timeToMinutes(end) <= timeToMinutes(start)) {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1981
return json({ error: 'Choose weekdays plus a valid start and end time.' }, 400);
return json({ error: 'Choose weekdays plus a valid start and end time.' }, 400);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1982
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1983
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1984
const id = crypto.randomUUID();
const id = crypto.randomUUID();
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1985
await env.DB.prepare(`
await env.DB.prepare(`
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1986
INSERT INTO recurring_unavailable_periods (id, weekdays, start_time, end_time, label)
INSERT INTO recurring_unavailable_periods (id, weekdays, start_time, end_time, label)
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1987
VALUES (?1, ?2, ?3, ?4, ?5)
VALUES (?1, ?2, ?3, ?4, ?5)
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1988
`).bind(id, weekdays.join(','), start, end, cleanLabel(raw.label)).run();
`).bind(id, weekdays.join(','), start, end, cleanLabel(raw.label)).run();
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1989
return json({ ok: true, id }, 201);
return json({ ok: true, id }, 201);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1990
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1991
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1992
async function createAvailabilityBlock(env: Env, input: unknown): Promise<Response> {
async function createAvailabilityBlock(env: Env, input: unknown): Promise<Response> {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1993
const raw = input as Partial<{ date: string; start: string; end: string; allDay: boolean; label: string }>;
const raw = input as Partial<{ date: string; start: string; end: string; allDay: boolean; label: string }>;
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1994
const date = String(raw.date ?? '');
const date = String(raw.date ?? '');
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1995
const allDay = Boolean(raw.allDay);
const allDay = Boolean(raw.allDay);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1996
const start = String(raw.start ?? '');
const start = String(raw.start ?? '');
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1997
const end = String(raw.end ?? '');
const end = String(raw.end ?? '');
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1998
if (!/^\d{4}-\d{2}-\d{2}$/.test(date)) return json({ error: 'Choose a valid date.' }, 400);
if (!/^\d{4}-\d{2}-\d{2}$/.test(date)) return json({ error: 'Choose a valid date.' }, 400);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1999
if (!allDay && (!isTime(start) || !isTime(end) || timeToMinutes(end) <= timeToMinutes(start))) {
if (!allDay && (!isTime(start) || !isTime(end) || timeToMinutes(end) <= timeToMinutes(start))) {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2000
return json({ error: 'Choose a valid start and end time, or mark the block all day.' }, 400);
return json({ error: 'Choose a valid start and end time, or mark the block all day.' }, 400);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2001
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2002
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2003
const id = crypto.randomUUID();
const id = crypto.randomUUID();
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2004
await env.DB.prepare(`
await env.DB.prepare(`
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2005
INSERT INTO availability_blocks (id, date, start_time, end_time, all_day, label)
INSERT INTO availability_blocks (id, date, start_time, end_time, all_day, label)
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2006
VALUES (?1, ?2, ?3, ?4, ?5, ?6)
VALUES (?1, ?2, ?3, ?4, ?5, ?6)
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2007
`).bind(id, date, allDay ? null : start, allDay ? null : end, allDay ? 1 : 0, cleanLabel(raw.label)).run();
`).bind(id, date, allDay ? null : start, allDay ? null : end, allDay ? 1 : 0, cleanLabel(raw.label)).run();
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2008
return json({ ok: true, id }, 201);
return json({ ok: true, id }, 201);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2009
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2010
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2011
async function deleteAvailabilityRule(env: Env, kind: string, id: string): Promise<Response> {
async function deleteAvailabilityRule(env: Env, kind: string, id: string): Promise<Response> {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2012
if (!/^[0-9a-f-]{36}$/i.test(id)) return json({ error: 'Invalid rule id.' }, 400);
if (!/^[0-9a-f-]{36}$/i.test(id)) return json({ error: 'Invalid rule id.' }, 400);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2013
if (kind === 'recurring') {
if (kind === 'recurring') {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2014
await env.DB.prepare('DELETE FROM recurring_unavailable_periods WHERE id = ?1').bind(id).run();
await env.DB.prepare('DELETE FROM recurring_unavailable_periods WHERE id = ?1').bind(id).run();
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2015
return json({ ok: true });
return json({ ok: true });
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2016
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2017
if (kind === 'block') {
if (kind === 'block') {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2018
await env.DB.prepare('DELETE FROM availability_blocks WHERE id = ?1').bind(id).run();
await env.DB.prepare('DELETE FROM availability_blocks WHERE id = ?1').bind(id).run();
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2019
return json({ ok: true });
return json({ ok: true });
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2020
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2021
return json({ error: 'Invalid availability rule type.' }, 400);
return json({ error: 'Invalid availability rule type.' }, 400);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2022
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2023
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2024
async function handleApi(request: Request, env: Env, url: URL): Promise<Response> {
async function handleApi(request: Request, env: Env, url: URL): Promise<Response> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2025
if (request.method === 'GET' && url.pathname === '/api/config') {
if (request.method === 'GET' && url.pathname === '/api/config') {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2026
const settings = await getSettings(env);
const settings = await getSettings(env);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2027
const connected = await hasGoogleConnection(env);
const connected = await hasGoogleConnection(env);
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2028
const paymentRequired = settings.paymentEnabled;
const paymentRequired = settings.paymentEnabled;
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2029
return json({
return json({
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2030
title: settings.title,
title: settings.title,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2031
subtitle: settings.subtitle,
subtitle: settings.subtitle,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2032
timezone: settings.timezone,
timezone: settings.timezone,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2033
bookingWindowDays: settings.bookingWindowDays,
bookingWindowDays: settings.bookingWindowDays,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2034
durations: settings.durations,
durations: settings.durations,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2035
defaultMeetingMode: settings.defaultMeetingMode,
defaultMeetingMode: settings.defaultMeetingMode,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2036
allowMeetingModes: settings.allowMeetingModes,
allowMeetingModes: settings.allowMeetingModes,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2037
availableWeekdays: Object.entries(settings.availability)
availableWeekdays: Object.entries(settings.availability)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2038
.filter(([, intervals]) => intervals.length > 0)
.filter(([, intervals]) => intervals.length > 0)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2039
.map(([day]) => Number(day)),
.map(([day]) => Number(day)),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2040
connected,
connected,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2041
payment: paymentRequired ? {
payment: paymentRequired ? {
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2042
enabled: true,
enabled: true,
Alex Nord
about 16 hours ago
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2043
required: settings.paymentFreeDurations.length === 0,
required: settings.paymentFreeDurations.length === 0,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2044
ready: stripeConfigured(env) && settings.paymentRatePerMinute > 0,
ready: stripeConfigured(env) && settings.paymentRatePerMinute > 0,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2045
ratePerMinute: settings.paymentRatePerMinute,
ratePerMinute: settings.paymentRatePerMinute,
Alex Nord
about 16 hours ago
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2046
freeDurations: settings.paymentFreeDurations,
freeDurations: settings.paymentFreeDurations,
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2047
currency: settings.paymentCurrency,
currency: settings.paymentCurrency,
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2048
label: settings.paymentLabel,
label: settings.paymentLabel,
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2049
} : undefined,
} : undefined,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2050
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2051
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2052
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2053
if (request.method === 'GET' && url.pathname === '/api/availability') {
if (request.method === 'GET' && url.pathname === '/api/availability') {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2054
const date = url.searchParams.get('date') ?? '';
const date = url.searchParams.get('date') ?? '';
Alex Nord
3 days ago
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2055
try {
try {
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2056
const result = await computeAvailability(env, date);
const result = await computeAvailability(env, date);
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2057
return json({
return json({
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2058
date: result.date,
date: result.date,
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2059
timezone: result.settings.timezone,
timezone: result.settings.timezone,
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2060
connected: result.connected,
connected: result.connected,
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2061
slots: result.slots,
slots: result.slots,
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2062
});
});
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2063
} catch (error) {
} catch (error) {
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2064
if (error instanceof GoogleCalendarError) {
if (error instanceof GoogleCalendarError) {
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2065
const settings = await getSettings(env);
const settings = await getSettings(env);
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2066
return json({
return json({
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2067
date,
date,
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2068
timezone: settings.timezone,
timezone: settings.timezone,
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2069
connected: true,
connected: true,
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2070
slots: [],
slots: [],
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2071
calendarError: error.publicMessage,
calendarError: error.publicMessage,
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2072
});
});
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2073
}
}
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2074
throw error;
throw error;
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2075
}
}
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2076
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2077
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2078
if (request.method === 'POST' && url.pathname === '/api/book') {
if (request.method === 'POST' && url.pathname === '/api/book') {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2079
const body = (await request.json()) as BookingRequest;
const body = (await request.json()) as BookingRequest;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2080
return createBooking(env, request, body);
return createBooking(env, request, body);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2081
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2082
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2083
if (request.method === 'POST' && url.pathname === '/api/bookings/cancel') {
if (request.method === 'POST' && url.pathname === '/api/bookings/cancel') {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2084
const body = await request.json().catch(() => ({})) as { bookingId?: string };
const body = await request.json().catch(() => ({})) as { bookingId?: string };
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2085
return publicCancelBooking(request, env, body.bookingId);
return publicCancelBooking(request, env, body.bookingId);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2086
}
}
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2087
Alex Nord
about 16 hours ago
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2088
if (request.method === 'POST' && url.pathname === '/api/bookings/manage') {
if (request.method === 'POST' && url.pathname === '/api/bookings/manage') {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2089
const body = await request.json().catch(() => ({})) as { bookingId?: string };
const body = await request.json().catch(() => ({})) as { bookingId?: string };
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2090
return publicManageBooking(request, env, body.bookingId);
return publicManageBooking(request, env, body.bookingId);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2091
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2092
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2093
if (request.method === 'POST' && url.pathname === '/api/bookings/manage/availability') {
if (request.method === 'POST' && url.pathname === '/api/bookings/manage/availability') {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2094
const body = await request.json().catch(() => ({})) as { bookingId?: string; date?: string };
const body = await request.json().catch(() => ({})) as { bookingId?: string; date?: string };
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2095
return publicManageAvailability(request, env, body.bookingId, body.date);
return publicManageAvailability(request, env, body.bookingId, body.date);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2096
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2097
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2098
if (request.method === 'POST' && url.pathname === '/api/bookings/reschedule') {
if (request.method === 'POST' && url.pathname === '/api/bookings/reschedule') {
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2099
const body = await request.json().catch(() => ({})) as { bookingId?: string; start?: string };
const body = await request.json().catch(() => ({})) as { bookingId?: string; start?: string };
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2100
return publicRescheduleBooking(request, env, body.bookingId, body.start);
return publicRescheduleBooking(request, env, body.bookingId, body.start);
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2101
}
}
same change
456feae
feat: add self-service booking management and free payment durations
- Full commit hash
456feae6ef68a3e3bf55a0ea617bac46f7dc289e- Author
- Alex Nord <[email protected]>
- Date
- about 16 hours ago
- Selected line
- 2102
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2103
if (request.method === 'POST' && url.pathname === '/api/payments/checkout') {
if (request.method === 'POST' && url.pathname === '/api/payments/checkout') {
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2104
const body = (await request.json()) as { bookingId?: string };
const body = (await request.json()) as { bookingId?: string };
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2105
return createPaymentCheckout(env, String(body.bookingId ?? ''));
return createPaymentCheckout(env, String(body.bookingId ?? ''));
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2106
}
}
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2107
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2108
if (request.method === 'GET' && url.pathname === '/api/payments/status') {
if (request.method === 'GET' && url.pathname === '/api/payments/status') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2109
return paymentStatus(env, String(url.searchParams.get('session_id') ?? ''));
return paymentStatus(env, String(url.searchParams.get('session_id') ?? ''));
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2110
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2111
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2112
if (request.method === 'GET' && url.pathname === '/api/payments/cancel-return') {
if (request.method === 'GET' && url.pathname === '/api/payments/cancel-return') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2113
return paymentCancelReturn(env, String(url.searchParams.get('booking_id') ?? ''));
return paymentCancelReturn(env, String(url.searchParams.get('booking_id') ?? ''));
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2114
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2115
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2116
if (request.method === 'POST' && url.pathname === '/api/payments/cancel') {
if (request.method === 'POST' && url.pathname === '/api/payments/cancel') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2117
const body = (await request.json()) as { bookingId?: string };
const body = (await request.json()) as { bookingId?: string };
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2118
return cancelPendingPayment(env, String(body.bookingId ?? ''));
return cancelPendingPayment(env, String(body.bookingId ?? ''));
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2119
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2120
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2121
if (request.method === 'POST' && url.pathname === '/api/stripe/webhook') {
if (request.method === 'POST' && url.pathname === '/api/stripe/webhook') {
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2122
return handleStripeWebhook(request, env);
return handleStripeWebhook(request, env);
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2123
}
}
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2124
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2125
const proposalMatch = url.pathname.match(/^\/api\/reschedule-suggestions\/([^/]+)$/);
const proposalMatch = url.pathname.match(/^\/api\/reschedule-suggestions\/([^/]+)$/);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2126
if (request.method === 'GET' && proposalMatch) {
if (request.method === 'GET' && proposalMatch) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2127
return getRescheduleProposal(env, decodeURIComponent(proposalMatch[1]));
return getRescheduleProposal(env, decodeURIComponent(proposalMatch[1]));
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2128
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2129
const proposalAcceptMatch = url.pathname.match(/^\/api\/reschedule-suggestions\/([^/]+)\/accept$/);
const proposalAcceptMatch = url.pathname.match(/^\/api\/reschedule-suggestions\/([^/]+)\/accept$/);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2130
if (request.method === 'POST' && proposalAcceptMatch) {
if (request.method === 'POST' && proposalAcceptMatch) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2131
return acceptRescheduleProposal(env, decodeURIComponent(proposalAcceptMatch[1]));
return acceptRescheduleProposal(env, decodeURIComponent(proposalAcceptMatch[1]));
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2132
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2133
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2134
if (url.pathname.startsWith('/api/admin/')) {
if (url.pathname.startsWith('/api/admin/')) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2135
const admin = await requireAdmin(request, env);
const admin = await requireAdmin(request, env);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2136
if (!admin) return json({ error: 'Unauthorized' }, 401);
if (!admin) return json({ error: 'Unauthorized' }, 401);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2137
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2138
if (request.method === 'GET' && url.pathname === '/api/admin/session') {
if (request.method === 'GET' && url.pathname === '/api/admin/session') {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2139
const connected = await hasGoogleConnection(env);
const connected = await hasGoogleConnection(env);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2140
return json({ authenticated: true, email: admin, connected });
return json({ authenticated: true, email: admin, connected });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2141
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2142
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2143
if (request.method === 'GET' && url.pathname === '/api/admin/settings') {
if (request.method === 'GET' && url.pathname === '/api/admin/settings') {
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2144
return json({
return json({
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2145
settings: await getSettings(env),
settings: await getSettings(env),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2146
stripeConfigured: stripeConfigured(env),
stripeConfigured: stripeConfigured(env),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2147
stripeMode: stripeMode(env),
stripeMode: stripeMode(env),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2148
});
});
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2149
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2150
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2151
if (request.method === 'PUT' && url.pathname === '/api/admin/settings') {
if (request.method === 'PUT' && url.pathname === '/api/admin/settings') {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2152
const settings = validateAppSettings(await request.json());
const settings = validateAppSettings(await request.json());
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2153
await saveSettings(env, settings);
await saveSettings(env, settings);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2154
return json({ ok: true, settings });
return json({ ok: true, settings });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2155
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2156
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2157
if (request.method === 'GET' && url.pathname === '/api/admin/activity') {
if (request.method === 'GET' && url.pathname === '/api/admin/activity') {
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2158
return adminActivity(env);
return adminActivity(env);
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2159
}
}
same change
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2160
Alex Nord
about 23 hours ago
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2161
if (request.method === 'GET' && url.pathname === '/api/admin/attendees') {
if (request.method === 'GET' && url.pathname === '/api/admin/attendees') {
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2162
return adminAttendees(env);
return adminAttendees(env);
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2163
}
}
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2164
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2165
if (request.method === 'GET' && url.pathname === '/api/admin/attendee-bookings') {
if (request.method === 'GET' && url.pathname === '/api/admin/attendee-bookings') {
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2166
return adminAttendeeBookings(env, url.searchParams.get('email') ?? '');
return adminAttendeeBookings(env, url.searchParams.get('email') ?? '');
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2167
}
}
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2168
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2169
if (request.method === 'GET' && url.pathname === '/api/admin/bookings') {
if (request.method === 'GET' && url.pathname === '/api/admin/bookings') {
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2170
const settings = await getSettings(env);
const settings = await getSettings(env);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2171
await cleanupStalePendingBookings(env, settings);
await cleanupStalePendingBookings(env, settings);
Alex Nord
about 23 hours ago
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2172
const query = (url.searchParams.get('q') ?? '').trim().toLowerCase();
const query = (url.searchParams.get('q') ?? '').trim().toLowerCase();
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2173
const select = `
const select = `
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2174
SELECT id, public_booking_id, name, email, start_time, end_time, duration_minutes,
SELECT id, public_booking_id, name, email, start_time, end_time, duration_minutes,
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2175
meeting_mode, status, meet_url, created_at,
meeting_mode, status, meet_url, created_at,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2176
cancelled_at, calendar_provider, calendar_sync_status,
cancelled_at, calendar_provider, calendar_sync_status,
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2177
calendar_sync_error, calendar_sync_updated_at,
calendar_sync_error, calendar_sync_updated_at,
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2178
payment_status, payment_amount, payment_currency,
payment_status, payment_amount, payment_currency,
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2179
stripe_checkout_session_id, stripe_payment_intent_id, paid_at,
stripe_checkout_session_id, stripe_payment_intent_id, paid_at,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2180
rescheduled_at, reschedule_count, proposed_start_time, proposed_end_time,
rescheduled_at, reschedule_count, proposed_start_time, proposed_end_time,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2181
proposed_at, proposal_status, refund_status, stripe_refund_id,
proposed_at, proposal_status, refund_status, stripe_refund_id,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2182
refunded_amount, refunded_at
refunded_amount, refunded_at
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2183
FROM bookings
FROM bookings
Alex Nord
about 23 hours ago
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2184
`;
`;
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2185
const result = query
const result = query
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2186
? await env.DB.prepare(`${select}
? await env.DB.prepare(`${select}
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2187
WHERE lower(COALESCE(public_booking_id, '')) LIKE ?1
WHERE lower(COALESCE(public_booking_id, '')) LIKE ?1
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2188
OR lower(id) LIKE ?1
OR lower(id) LIKE ?1
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2189
OR lower(name) LIKE ?1
OR lower(name) LIKE ?1
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2190
OR lower(email) LIKE ?1
OR lower(email) LIKE ?1
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2191
ORDER BY start_time DESC
ORDER BY start_time DESC
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2192
LIMIT 100
LIMIT 100
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2193
`).bind(`%${query}%`).all()
`).bind(`%${query}%`).all()
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2194
: await env.DB.prepare(`${select}
: await env.DB.prepare(`${select}
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2195
ORDER BY start_time DESC
ORDER BY start_time DESC
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2196
LIMIT 100
LIMIT 100
same change
862116d
feat: add attendee insights and booking search
- Full commit hash
862116d1429c92c653ba637895820678ba975eb9- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 2197
`).all();
`).all();
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2198
return json({ bookings: result.results ?? [] });
return json({ bookings: result.results ?? [] });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2199
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2200
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2201
const cancelMatch = url.pathname.match(/^\/api\/admin\/bookings\/([^/]+)\/cancel$/);
const cancelMatch = url.pathname.match(/^\/api\/admin\/bookings\/([^/]+)\/cancel$/);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2202
if (request.method === 'POST' && cancelMatch) {
if (request.method === 'POST' && cancelMatch) {
Alex Nord
1 day ago
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2203
const body = await request.json().catch(() => ({})) as { allowStaleStripeRelease?: boolean };
const body = await request.json().catch(() => ({})) as { allowStaleStripeRelease?: boolean };
same change
f1dbf89
fix: clarify availability limits and document Stripe as optional
- Full commit hash
f1dbf89ac73246b1bdab27a2d40d1f2ab4374bf8- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2204
return cancelBooking(env, cancelMatch[1], body.allowStaleStripeRelease === true);
return cancelBooking(env, cancelMatch[1], body.allowStaleStripeRelease === true);
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2205
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2206
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2207
const bookingAvailabilityMatch = url.pathname.match(/^\/api\/admin\/bookings\/([^/]+)\/availability$/);
const bookingAvailabilityMatch = url.pathname.match(/^\/api\/admin\/bookings\/([^/]+)\/availability$/);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2208
if (request.method === 'GET' && bookingAvailabilityMatch) {
if (request.method === 'GET' && bookingAvailabilityMatch) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2209
const booking = await paymentBookingById(env, bookingAvailabilityMatch[1]);
const booking = await paymentBookingById(env, bookingAvailabilityMatch[1]);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2210
if (!booking) return json({ error: 'Booking not found.' }, 404);
if (!booking) return json({ error: 'Booking not found.' }, 404);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2211
if (booking.status !== 'confirmed') return json({ error: 'Only confirmed bookings can be rescheduled.' }, 409);
if (booking.status !== 'confirmed') return json({ error: 'Only confirmed bookings can be rescheduled.' }, 409);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2212
const date = url.searchParams.get('date') ?? '';
const date = url.searchParams.get('date') ?? '';
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2213
try {
try {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2214
const result = await computeAvailability(env, date);
const result = await computeAvailability(env, date);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2215
return json({
return json({
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2216
date: result.date,
date: result.date,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2217
timezone: result.settings.timezone,
timezone: result.settings.timezone,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2218
duration: booking.duration_minutes,
duration: booking.duration_minutes,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2219
slots: result.slots.filter((slot) => slot.durations.includes(booking.duration_minutes)),
slots: result.slots.filter((slot) => slot.durations.includes(booking.duration_minutes)),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2220
});
});
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2221
} catch (error) {
} catch (error) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2222
return json({ error: errorMessage(error) }, 400);
return json({ error: errorMessage(error) }, 400);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2223
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2224
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2225
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2226
const rescheduleMatch = url.pathname.match(/^\/api\/admin\/bookings\/([^/]+)\/reschedule$/);
const rescheduleMatch = url.pathname.match(/^\/api\/admin\/bookings\/([^/]+)\/reschedule$/);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2227
if (request.method === 'POST' && rescheduleMatch) {
if (request.method === 'POST' && rescheduleMatch) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2228
const body = await request.json().catch(() => ({})) as { start?: string };
const body = await request.json().catch(() => ({})) as { start?: string };
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2229
return adminRescheduleBooking(env, rescheduleMatch[1], String(body.start ?? ''));
return adminRescheduleBooking(env, rescheduleMatch[1], String(body.start ?? ''));
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2230
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2231
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2232
const suggestMatch = url.pathname.match(/^\/api\/admin\/bookings\/([^/]+)\/suggest$/);
const suggestMatch = url.pathname.match(/^\/api\/admin\/bookings\/([^/]+)\/suggest$/);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2233
if (request.method === 'POST' && suggestMatch) {
if (request.method === 'POST' && suggestMatch) {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2234
const body = await request.json().catch(() => ({})) as { start?: string };
const body = await request.json().catch(() => ({})) as { start?: string };
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2235
return adminSuggestNewTime(env, suggestMatch[1], String(body.start ?? ''));
return adminSuggestNewTime(env, suggestMatch[1], String(body.start ?? ''));
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2236
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 2237
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2238
if (request.method === 'GET' && url.pathname === '/api/admin/availability-rules') {
if (request.method === 'GET' && url.pathname === '/api/admin/availability-rules') {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2239
return listAvailabilityRules(env);
return listAvailabilityRules(env);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2240
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2241
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2242
if (request.method === 'POST' && url.pathname === '/api/admin/availability-rules/recurring') {
if (request.method === 'POST' && url.pathname === '/api/admin/availability-rules/recurring') {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2243
return createRecurringUnavailable(env, await request.json());
return createRecurringUnavailable(env, await request.json());
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2244
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2245
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2246
if (request.method === 'POST' && url.pathname === '/api/admin/availability-rules/blocks') {
if (request.method === 'POST' && url.pathname === '/api/admin/availability-rules/blocks') {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2247
return createAvailabilityBlock(env, await request.json());
return createAvailabilityBlock(env, await request.json());
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2248
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2249
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2250
const availabilityDeleteMatch = url.pathname.match(/^\/api\/admin\/availability-rules\/(recurring|block)\/([^/]+)$/);
const availabilityDeleteMatch = url.pathname.match(/^\/api\/admin\/availability-rules\/(recurring|block)\/([^/]+)$/);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2251
if (request.method === 'DELETE' && availabilityDeleteMatch) {
if (request.method === 'DELETE' && availabilityDeleteMatch) {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2252
return deleteAvailabilityRule(env, availabilityDeleteMatch[1], availabilityDeleteMatch[2]);
return deleteAvailabilityRule(env, availabilityDeleteMatch[1], availabilityDeleteMatch[2]);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2253
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2254
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2255
if (request.method === 'POST' && url.pathname === '/api/admin/disconnect-google') {
if (request.method === 'POST' && url.pathname === '/api/admin/disconnect-google') {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2256
await disconnectGoogle(env);
await disconnectGoogle(env);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2257
return json({ ok: true });
return json({ ok: true });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2258
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2259
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2260
if (request.method === 'POST' && url.pathname === '/api/admin/logout') {
if (request.method === 'POST' && url.pathname === '/api/admin/logout') {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2261
return json({ ok: true }, 200, { 'Set-Cookie': clearSessionCookie(env.APP_URL.startsWith('https://')) });
return json({ ok: true }, 200, { 'Set-Cookie': clearSessionCookie(env.APP_URL.startsWith('https://')) });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2262
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2263
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2264
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2265
return json({ error: 'Not found' }, 404);
return json({ error: 'Not found' }, 404);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2266
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2267
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2268
async function handleAuth(request: Request, env: Env, url: URL): Promise<Response> {
async function handleAuth(request: Request, env: Env, url: URL): Promise<Response> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2269
if (request.method === 'GET' && url.pathname === '/auth/google/start') {
if (request.method === 'GET' && url.pathname === '/auth/google/start') {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2270
return redirect(await createGoogleAuthUrl(env, url.searchParams.get('force') === '1'));
return redirect(await createGoogleAuthUrl(env, url.searchParams.get('force') === '1'));
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2271
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2272
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2273
if (request.method === 'GET' && url.pathname === '/auth/google/callback') {
if (request.method === 'GET' && url.pathname === '/auth/google/callback') {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2274
const error = url.searchParams.get('error');
const error = url.searchParams.get('error');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2275
if (error) return redirect(`/admin?oauth_error=${encodeURIComponent(error)}`);
if (error) return redirect(`/admin?oauth_error=${encodeURIComponent(error)}`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2276
const state = url.searchParams.get('state');
const state = url.searchParams.get('state');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2277
const code = url.searchParams.get('code');
const code = url.searchParams.get('code');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2278
if (!state || !code) return redirect('/admin?oauth_error=missing_callback_parameters');
if (!state || !code) return redirect('/admin?oauth_error=missing_callback_parameters');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2279
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2280
try {
try {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2281
const email = await completeGoogleOAuth(env, state, code);
const email = await completeGoogleOAuth(env, state, code);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2282
const token = await signSession(env, email);
const token = await signSession(env, email);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2283
return redirect('/admin?connected=1', {
return redirect('/admin?connected=1', {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2284
'Set-Cookie': sessionCookie(token, 7 * 86400, env.APP_URL.startsWith('https://')),
'Set-Cookie': sessionCookie(token, 7 * 86400, env.APP_URL.startsWith('https://')),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2285
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2286
} catch (error) {
} catch (error) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2287
return redirect(`/admin?oauth_error=${encodeURIComponent(errorMessage(error))}`);
return redirect(`/admin?oauth_error=${encodeURIComponent(errorMessage(error))}`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2288
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2289
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2290
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2291
return new Response('Not found', { status: 404 });
return new Response('Not found', { status: 404 });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2292
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2293
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2294
export default {
export default {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2295
async fetch(request: Request, env: Env): Promise<Response> {
async fetch(request: Request, env: Env): Promise<Response> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2296
const url = new URL(request.url);
const url = new URL(request.url);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2297
try {
try {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2298
if (url.pathname.startsWith('/api/')) return await handleApi(request, env, url);
if (url.pathname.startsWith('/api/')) return await handleApi(request, env, url);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2299
if (url.pathname.startsWith('/auth/')) return await handleAuth(request, env, url);
if (url.pathname.startsWith('/auth/')) return await handleAuth(request, env, url);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2300
return new Response('Not found', { status: 404 });
return new Response('Not found', { status: 404 });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2301
} catch (error) {
} catch (error) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2302
console.error(error);
console.error(error);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2303
if (url.pathname.startsWith('/api/')) return json({ error: errorMessage(error) }, 500);
if (url.pathname.startsWith('/api/')) return json({ error: errorMessage(error) }, 500);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2304
return new Response(errorMessage(error), { status: 500 });
return new Response(errorMessage(error), { status: 500 });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2305
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2306
},
},
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2307
} satisfies ExportedHandler<Env>;
} satisfies ExportedHandler<Env>;