♻️ Use synchronous id generation (#645)

This commit is contained in:
Luke Vella 2023-04-03 18:46:25 +01:00 committed by GitHub
parent 27bbe6f947
commit ffa7007184
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 12 additions and 27 deletions

View file

@ -53,8 +53,8 @@ export const polls = router({
)
.mutation(
async ({ ctx, input }): Promise<{ id: string; urlId: string }> => {
const adminUrlId = await nanoid();
const participantUrlId = await nanoid();
const adminUrlId = nanoid();
const participantUrlId = nanoid();
let email = input.user?.email;
let name = input.user?.name;
@ -83,7 +83,7 @@ export const polls = router({
title: true,
},
data: {
id: await nanoid(),
id: nanoid(),
title: input.title,
timeZone: input.timeZone,
location: input.location,