app.get('/start', async (req, res) => {
const start = Date.now();
const userExists = await db.query(
Exists(
Ref(Collection('users'), Match(Index('getUserById'), req.author.id))
)
);
if (userExists) {
res.send('You alreay have a account!');
return;
}
db.query(Create(Collection('users'), { data: { id: req.author.id } })).then(
() => {
res.send(`Finished, it took me ${Date.now() - start}ms!`);
}
);
});
I keep getting this error in my express app:
description: 'String or Number expected, Set provided.'
I’m new to faunadb and am transitioning from firebase, help is much appreciated