This repository was archived by the owner on Apr 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ export class GroupController {
3333 validator (
3434 {
3535 name : Joi . string ( ) ,
36- username : Joi . string ( ) . regex ( / ^ [ a - z 0 - 9 \- ] + $ / i) ,
3736 forceTwoFactor : Joi . boolean ( ) ,
3837 autoJoinDomain : Joi . boolean ( ) ,
3938 onlyAllowDomain : Joi . boolean ( ) ,
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ export class UserController {
3333 name : Joi . string ( )
3434 . min ( 3 )
3535 . regex ( / ^ [ a - z A - Z ] * $ / ) ,
36- username : Joi . string ( ) . regex ( / ^ [ a - z 0 - 9 \- ] + $ / i) ,
3736 nickname : Joi . string ( ) ,
3837 primaryEmail : [ Joi . string ( ) , Joi . number ( ) ] ,
3938 countryCode : Joi . string ( ) . length ( 2 ) ,
You can’t perform that action at this time.
0 commit comments