What is Nostr?
hellowmellow /
npub15s9…gcdx
2024-07-08 18:18:06
in reply to nevent1q…tda5

hellowmellow on Nostr: cool. Also, a quick question. Is there a way to add for the api to check if the user ...

cool. Also, a quick question. Is there a way to add for the api to check if the user already exists and then prevent registration instead of appending digits and letters to the newer ones? Maybe something like this:


<code> // Check existing
const existingUser = await user.getUidByUsername(username);
if (existingUser) {
return helpers.formatResponse(400, res, { message: 'Username not available' });
}
</code>
Author Public Key
npub15s9gs4qyu28elp43qk3qh70ntvtn7s9stnuqvqyy2ch8v4gjutpqg8gcdx