NobGit
public imalexnord read

Slot

Calendar-first scheduling powered by Cloudflare Workers and Google Calendar.

Languages

Repository composition by tracked source files.

TypeScript
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/settings.ts

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

settings.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 type { AppSettings, Env } from './types';
Open commit View diff
1 import type { AppSettings, Env } from './types';
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
2
Open commit View diff
2
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
3
export const DEFAULT_SETTINGS: AppSettings = {
Open commit View diff
3 export const DEFAULT_SETTINGS: AppSettings = {
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
4
  title: 'Book a slot',
Open commit View diff
4 title: 'Book a slot',
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
5
  subtitle: 'Pick a day, choose a time, and you are set.',
Open commit View diff
5 subtitle: 'Pick a day, choose a time, and you are set.',
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
6
  timezone: 'Europe/Stockholm',
Open commit View diff
6 timezone: 'Europe/Stockholm',
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
7
  bookingWindowDays: 365,
Open commit View diff
7 bookingWindowDays: 365,
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
8
  minimumNoticeMinutes: 120,
Open commit View diff
8 minimumNoticeMinutes: 120,
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
9
  bufferBeforeMinutes: 0,
Open commit View diff
9 bufferBeforeMinutes: 0,
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
10
  bufferAfterMinutes: 15,
Open commit View diff
10 bufferAfterMinutes: 15,
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
11
  slotIncrementMinutes: 15,
Open commit View diff
11 slotIncrementMinutes: 15,
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
12
  durations: [15, 30, 45, 60],
Open commit View diff
12 durations: [15, 30, 45, 60],
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
13
  calendarId: 'primary',
Open commit View diff
13 calendarId: 'primary',
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
14
  busyCalendarIds: ['primary'],
Open commit View diff
14 busyCalendarIds: ['primary'],
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
15
  defaultMeetingMode: 'google_meet',
Open commit View diff
15 defaultMeetingMode: 'google_meet',
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
16
  allowMeetingModes: ['google_meet'],
Open commit View diff
16 allowMeetingModes: ['google_meet'],
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
17
  inPersonLocation: '',
Open commit View diff
17 inPersonLocation: '',
Alex Nord 1 day ago 9abcc27

Added Stripe payments

Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
18
  paymentEnabled: false,
Open commit View diff
18 paymentEnabled: false,
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
19
  paymentRatePerMinute: 0,
Open commit View diff
19 paymentRatePerMinute: 0,
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
20
  paymentFreeDurations: [],
Open commit View diff
20 paymentFreeDurations: [],
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
21
  paymentCurrency: 'sek',
Open commit View diff
21 paymentCurrency: 'sek',
Alex Nord 1 day ago 9abcc27

Added Stripe payments

Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
22
  paymentLabel: 'Booking payment',
Open commit View diff
22 paymentLabel: 'Booking payment',
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
  availability: {
Open commit View diff
23 availability: {
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
24
    '0': [],
Open commit View diff
24 '0': [],
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
25
    '1': [{ start: '09:00', end: '17:00' }],
Open commit View diff
25 '1': [{ start: '09:00', end: '17:00' }],
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
26
    '2': [{ start: '09:00', end: '17:00' }],
Open commit View diff
26 '2': [{ start: '09:00', end: '17:00' }],
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
27
    '3': [{ start: '09:00', end: '17:00' }],
Open commit View diff
27 '3': [{ start: '09:00', end: '17:00' }],
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
28
    '4': [{ start: '09:00', end: '17:00' }],
Open commit View diff
28 '4': [{ start: '09:00', end: '17:00' }],
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
29
    '5': [{ start: '09:00', end: '15:00' }],
Open commit View diff
29 '5': [{ start: '09:00', end: '15:00' }],
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
30
    '6': [],
Open commit View diff
30 '6': [],
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
31
  },
Open commit View diff
31 },
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
32
};
Open commit View diff
32 };
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
33
Open commit View diff
33
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
34
export async function getSettings(env: Env): Promise<AppSettings> {
Open commit View diff
34 export async function getSettings(env: Env): Promise<AppSettings> {
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
35
  const row = await env.DB.prepare('SELECT value FROM settings WHERE key = ?1')
Open commit View diff
35 const row = await env.DB.prepare('SELECT value FROM settings 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
36
    .bind('app_settings')
Open commit View diff
36 .bind('app_settings')
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
37
    .first<{ value: string }>();
Open commit View diff
37 .first<{ value: string }>();
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
38
Open commit View diff
38
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
39
  if (!row?.value) return DEFAULT_SETTINGS;
Open commit View diff
39 if (!row?.value) return DEFAULT_SETTINGS;
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
40
Open commit View diff
40
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
41
  try {
Open commit View diff
41 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
42
    const parsed = JSON.parse(row.value) as Partial<AppSettings> & { paymentAmountMinor?: number };
Open commit View diff
42 const parsed = JSON.parse(row.value) as Partial<AppSettings> & { paymentAmountMinor?: 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
43
    const currency = typeof parsed.paymentCurrency === 'string' && /^[a-zA-Z]{3}$/.test(parsed.paymentCurrency)
Open commit View diff
43 const currency = typeof parsed.paymentCurrency === 'string' && /^[a-zA-Z]{3}$/.test(parsed.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
44
      ? parsed.paymentCurrency.toLowerCase()
Open commit View diff
44 ? parsed.paymentCurrency.toLowerCase()
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
45
      : DEFAULT_SETTINGS.paymentCurrency;
Open commit View diff
45 : DEFAULT_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
46
    const hasPerMinuteRate = parsed.paymentRatePerMinute !== undefined
Open commit View diff
46 const hasPerMinuteRate = parsed.paymentRatePerMinute !== 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
47
      && Number.isFinite(Number(parsed.paymentRatePerMinute));
Open commit View diff
47 && Number.isFinite(Number(parsed.paymentRatePerMinute));
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
48
    const paymentRatePerMinute = hasPerMinuteRate
Open commit View diff
48 const paymentRatePerMinute = hasPerMinuteRate
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
49
      ? Math.max(0, Number(parsed.paymentRatePerMinute))
Open commit View diff
49 ? Math.max(0, Number(parsed.paymentRatePerMinute))
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
50
      : DEFAULT_SETTINGS.paymentRatePerMinute;
Open commit View diff
50 : DEFAULT_SETTINGS.paymentRatePerMinute;
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
51
    return {
Open commit View diff
51 return {
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
52
      ...DEFAULT_SETTINGS,
Open commit View diff
52 ...DEFAULT_SETTINGS,
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
53
      ...parsed,
Open commit View diff
53 ...parsed,
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
54
      // Old releases stored one fixed Stripe amount in `paymentAmountMinor`.
Open commit View diff
54 // Old releases stored one fixed Stripe amount in `paymentAmountMinor`.
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
55
      // There is no safe way to reinterpret that as a per-minute rate, so legacy
Open commit View diff
55 // There is no safe way to reinterpret that as a per-minute rate, so legacy
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
56
      // payment settings are deliberately disabled until the owner saves a rate.
Open commit View diff
56 // payment settings are deliberately disabled until the owner saves a rate.
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
57
      paymentEnabled: hasPerMinuteRate ? Boolean(parsed.paymentEnabled) : false,
Open commit View diff
57 paymentEnabled: hasPerMinuteRate ? Boolean(parsed.paymentEnabled) : false,
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
58
      paymentCurrency: currency,
Open commit View diff
58 paymentCurrency: 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
59
      paymentRatePerMinute,
Open commit View diff
59 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
60
      paymentFreeDurations: Array.isArray(parsed.paymentFreeDurations)
Open commit View diff
60 paymentFreeDurations: Array.isArray(parsed.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
61
        ? parsed.paymentFreeDurations.map(Number).filter((value) => Number.isFinite(value) && value > 0)
Open commit View diff
61 ? parsed.paymentFreeDurations.map(Number).filter((value) => Number.isFinite(value) && value > 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
62
        : DEFAULT_SETTINGS.paymentFreeDurations,
Open commit View diff
62 : DEFAULT_SETTINGS.paymentFreeDurations,
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
63
      durations: Array.isArray(parsed.durations) ? parsed.durations : DEFAULT_SETTINGS.durations,
Open commit View diff
63 durations: Array.isArray(parsed.durations) ? parsed.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
64
      busyCalendarIds: Array.isArray(parsed.busyCalendarIds) ? parsed.busyCalendarIds : DEFAULT_SETTINGS.busyCalendarIds,
Open commit View diff
64 busyCalendarIds: Array.isArray(parsed.busyCalendarIds) ? parsed.busyCalendarIds : DEFAULT_SETTINGS.busyCalendarIds,
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
65
      allowMeetingModes: Array.isArray(parsed.allowMeetingModes)
Open commit View diff
65 allowMeetingModes: Array.isArray(parsed.allowMeetingModes)
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
66
        ? parsed.allowMeetingModes
Open commit View diff
66 ? parsed.allowMeetingModes
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
67
        : DEFAULT_SETTINGS.allowMeetingModes,
Open commit View diff
67 : 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
68
      availability: {
Open commit View diff
68 availability: {
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
69
        ...DEFAULT_SETTINGS.availability,
Open commit View diff
69 ...DEFAULT_SETTINGS.availability,
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
70
        ...(parsed.availability ?? {}),
Open commit View diff
70 ...(parsed.availability ?? {}),
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
71
      },
Open commit View diff
71 },
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
72
    };
Open commit View diff
72 };
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
73
  } catch {
Open commit View diff
73 } catch {
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
74
    return DEFAULT_SETTINGS;
Open commit View diff
74 return DEFAULT_SETTINGS;
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
75
  }
Open commit View diff
75 }
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
76
}
Open commit View diff
76 }
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
77
Open commit View diff
77
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
78
export async function saveSettings(env: Env, settings: AppSettings): Promise<void> {
Open commit View diff
78 export async function saveSettings(env: Env, settings: AppSettings): Promise<void> {
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
79
  await env.DB.prepare(`
Open commit View diff
79 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
80
    INSERT INTO settings (key, value, updated_at)
Open commit View diff
80 INSERT INTO settings (key, value, updated_at)
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
81
    VALUES (?1, ?2, datetime('now'))
Open commit View diff
81 VALUES (?1, ?2, datetime('now'))
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
82
    ON CONFLICT(key) DO UPDATE SET value = excluded.value, updated_at = excluded.updated_at
Open commit View diff
82 ON CONFLICT(key) DO UPDATE SET value = excluded.value, updated_at = excluded.updated_at
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
83
  `).bind('app_settings', JSON.stringify(settings)).run();
Open commit View diff
83 `).bind('app_settings', JSON.stringify(settings)).run();
same change 45c38c3

Prepare Slot booking worker

Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5
Author
Alex Nord <[email protected]>
Date
3 days ago
Selected line
84
}
Open commit View diff
84 }