Skip to content

Commit

Permalink
feat: update maintainer function so it's not verbose code
Browse files Browse the repository at this point in the history
  • Loading branch information
DEV-DIBSTER committed Jan 1, 2024
1 parent d2f8613 commit e5c88ab
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,17 +590,17 @@ async function getHosting(jwt, domain) {
}

async function Maintainer(username) {
if (!username) return false;
if (username === "andrewstech") return true;
if (username === "hackermondev") return true;
if (username === "mtgsquad") return true;
if (username === "phenax") return true;
if (username === "VaibhavSys") return true;
if (username === "wdhdev") return true;
if (username === "DEV-DIBSTER") return true;
else return false;
const validUsernames = [
"andrewstech",
"hackermondev",
"mtgsquad",
"phenax",
"VaibhavSys",
"wdhdev",
"DEV-DIBSTER"
];

return Boolean(username && validUsernames.includes(username));
}



export { CheckDomain, CountDomains, countDomainsAndOwners, DeleteDomain, DomainInfo, EditDomain, forkRepo, ListDomains, RegisterDomain, getUser, getEmail, getHosting, RegisterHosting, EditHosting, Maintainer };

0 comments on commit e5c88ab

Please sign in to comment.