Skip to content
This repository was archived by the owner on Apr 19, 2023. It is now read-only.

Commit 3fac6c9

Browse files
♻️ Remove username validation
1 parent 4f450a4 commit 3fac6c9

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/_staart/services/group.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,11 @@ export const createDomain = async (domain: domainsCreateInput) => {
189189
};
190190

191191
/**
192-
* Get a user by their username
192+
* Check if a domain is available
193193
*/
194-
export const checkDomainAvailability = async (username: string) => {
194+
export const checkDomainAvailability = async (domainName: string) => {
195195
try {
196-
const domain = await getDomainByDomainName(username);
196+
const domain = await getDomainByDomainName(domainName);
197197
if (domain && domain.id) return false;
198198
} catch (error) {}
199199
return true;

src/controllers/groups/_id/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export class GroupController {
3333
validator(
3434
{
3535
name: Joi.string(),
36-
username: Joi.string().regex(/^[a-z0-9\-]+$/i),
3736
forceTwoFactor: Joi.boolean(),
3837
autoJoinDomain: Joi.boolean(),
3938
onlyAllowDomain: Joi.boolean(),

src/controllers/users/_id/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export class UserController {
3333
name: Joi.string()
3434
.min(3)
3535
.regex(/^[a-zA-Z ]*$/),
36-
username: Joi.string().regex(/^[a-z0-9\-]+$/i),
3736
nickname: Joi.string(),
3837
primaryEmail: [Joi.string(), Joi.number()],
3938
countryCode: Joi.string().length(2),

0 commit comments

Comments
 (0)