update post request
parent
25f4273124
commit
fcabcf7266
|
@ -1,24 +1,44 @@
|
|||
import { db } from '../../lib/db';
|
||||
|
||||
export const createBooking = async (booking: { id: number }) => {
|
||||
db.insertInto('Booking')
|
||||
export const createBooking = async ({
|
||||
name,
|
||||
email,
|
||||
timeZone,
|
||||
}: {
|
||||
name: string;
|
||||
email: string;
|
||||
timeZone: string;
|
||||
}) => {
|
||||
await db
|
||||
.insertInto('Attendee')
|
||||
.values({
|
||||
responses: {
|
||||
email: '{{$randomExampleEmail}}',
|
||||
name: '{{$randomFullName}}',
|
||||
notes: '{{$randomCatchPhrase}}',
|
||||
guests: [],
|
||||
phone: '{{$randomPhoneNumber}}',
|
||||
},
|
||||
start: '{{start}}',
|
||||
end: '{{end}}',
|
||||
eventTypeId: 3,
|
||||
timeZone: 'America/Mazatlan',
|
||||
language: 'en',
|
||||
location: '',
|
||||
metadata: {},
|
||||
hasHashedBookingLink: false,
|
||||
hashedLink: null,
|
||||
id: 6969,
|
||||
email: 'sahalrajiv690000000@gmail.com',
|
||||
name: 'Ryukeeeeee',
|
||||
timeZone: 'Europe/London',
|
||||
bookingId: 16,
|
||||
locale: 'en',
|
||||
})
|
||||
.executeTakeFirst();
|
||||
.execute();
|
||||
|
||||
// db.insertInto('Booking')
|
||||
// .values({
|
||||
// responses: {
|
||||
// email: '{{$randomExampleEmail}}',
|
||||
// name: '{{$randomFullName}}',
|
||||
// notes: '{{$randomCatchPhrase}}',
|
||||
// guests: [],
|
||||
// phone: '{{$randomPhoneNumber}}',
|
||||
// },
|
||||
// start: '{{start}}',
|
||||
// end: '{{end}}',
|
||||
// eventTypeId: 3,
|
||||
// timeZone: 'America/Mazatlan',
|
||||
// language: 'en',
|
||||
// location: '',
|
||||
// metadata: {},
|
||||
// hasHashedBookingLink: false,
|
||||
// hashedLink: null,
|
||||
// })
|
||||
// .executeTakeFirst();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue