fix attempt x3-4 idk

master
Matthew 2021-07-05 23:58:58 -04:00
parent 97b22ef72b
commit 5ec6f20f9e
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 6 additions and 6 deletions

View File

@ -155,7 +155,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
});
if (await client.db.PagerNumber.findOne({ num: randomPagerNumber })) continue;
pager = await newNumber.save();
if ((await client.util.authClient.getUsersByEmail(acknowledgement.emailAddress)).length) {
if (!(await client.util.authClient.getUsersByEmail(acknowledgement.emailAddress)).length) {
await client.util.authClient.createUser({
email: acknowledgement.emailAddress,
name: member.username,
@ -200,7 +200,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
});
if (await client.db.PagerNumber.findOne({ num: randomPagerNumber })) continue;
pager = await newNumber.save();
if ((await client.util.authClient.getUsersByEmail(acknowledgement.emailAddress)).length) {
if (!(await client.util.authClient.getUsersByEmail(acknowledgement.emailAddress)).length) {
await client.util.authClient.createUser({
email: acknowledgement.emailAddress,
name: member.username,
@ -246,7 +246,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
});
if (await client.db.PagerNumber.findOne({ num: randomPagerNumber })) continue;
pager = await newNumber.save();
if ((await client.util.authClient.getUsersByEmail(acknowledgement.emailAddress)).length) {
if (!(await client.util.authClient.getUsersByEmail(acknowledgement.emailAddress)).length) {
await client.util.authClient.createUser({
email: acknowledgement.emailAddress,
name: member.username,
@ -292,7 +292,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
});
if (await client.db.PagerNumber.findOne({ num: randomPagerNumber })) continue;
pager = await newNumber.save();
if ((await client.util.authClient.getUsersByEmail(acknowledgement.emailAddress)).length) {
if (!(await client.util.authClient.getUsersByEmail(acknowledgement.emailAddress)).length) {
await client.util.authClient.createUser({
email: acknowledgement.emailAddress,
name: member.username,
@ -338,7 +338,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
});
if (await client.db.PagerNumber.findOne({ num: randomPagerNumber })) continue;
pager = await newNumber.save();
if ((await client.util.authClient.getUsersByEmail(acknowledgement.emailAddress)).length) {
if (!(await client.util.authClient.getUsersByEmail(acknowledgement.emailAddress)).length) {
await client.util.authClient.createUser({
email: acknowledgement.emailAddress,
name: member.username,
@ -384,7 +384,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
});
if (await client.db.PagerNumber.findOne({ num: randomPagerNumber })) continue;
pager = await newNumber.save();
if ((await client.util.authClient.getUsersByEmail(acknowledgement.emailAddress)).length) {
if (!(await client.util.authClient.getUsersByEmail(acknowledgement.emailAddress)).length) {
await client.util.authClient.createUser({
email: acknowledgement.emailAddress,
name: member.username,