Hey there, I’m using fauna for our NextAuth Provider and I’ve run into some trouble. I try to update a user ref, but it says it’s invalid?
if(message.isNewUser) {
// Query and add the discord id to the user object
client.query(
q.Update(
q.Select(message.user.id,
q.Get(
q.Match(q.Index("users_by_id"), message.user.id)
)
),
{
data: {
discordId: message.account.providerAccountId,
}
}
))
.then(res => console.log(`[NextAuth]: Updated new user ${message.user.id} (${message.account.providerAccountId}) res: ${res}`))
.catch(err => console.log(`[NextAuth]: Error updating new user ${message.user.id} err: ${err}`))
}
[NextAuth]: Error updating new user 330472730502627396 err: BadRequest: invalid ref
, but in dash that is a vaild ref. What am I doing wrong?