mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-06 12:41:48 +02:00
⬆️ v3.0.0 (#704)
This commit is contained in:
parent
735056f25f
commit
c22b3abc4d
385 changed files with 19912 additions and 5250 deletions
|
@ -13,6 +13,17 @@ import { LoginTokenPayload, RegistrationTokenPayload } from "../types";
|
|||
// we could have multiple guests because a login might be triggered from one device
|
||||
// and opened in another one.
|
||||
const mergeGuestsIntoUser = async (userId: string, guestIds: string[]) => {
|
||||
await prisma.poll.updateMany({
|
||||
where: {
|
||||
userId: {
|
||||
in: guestIds,
|
||||
},
|
||||
},
|
||||
data: {
|
||||
userId: userId,
|
||||
},
|
||||
});
|
||||
|
||||
await prisma.participant.updateMany({
|
||||
where: {
|
||||
userId: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue