mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 01:56:15 -06:00
rename function, strip port from domain validation
This commit is contained in:
parent
6c9a3e4a56
commit
8db867b6df
10 changed files with 57 additions and 40 deletions
|
|
@ -161,7 +161,7 @@ func (i *instanceDB) GetInstance(ctx context.Context, domain string) (*gtsmodel.
|
|||
var err error
|
||||
|
||||
// Normalize the domain as punycode
|
||||
domain, err = util.Punify_(domain)
|
||||
domain, err = util.Punify(domain)
|
||||
if err != nil {
|
||||
return nil, gtserror.Newf("error punifying domain %s: %w", domain, err)
|
||||
}
|
||||
|
|
@ -268,7 +268,7 @@ func (i *instanceDB) PutInstance(ctx context.Context, instance *gtsmodel.Instanc
|
|||
|
||||
// Normalize the domain as punycode, note the extra
|
||||
// validation step for domain name write operations.
|
||||
instance.Domain, err = util.PunifyValidate(instance.Domain)
|
||||
instance.Domain, err = util.PunifySafely(instance.Domain)
|
||||
if err != nil {
|
||||
return gtserror.Newf("error punifying domain %s: %w", instance.Domain, err)
|
||||
}
|
||||
|
|
@ -285,7 +285,7 @@ func (i *instanceDB) UpdateInstance(ctx context.Context, instance *gtsmodel.Inst
|
|||
|
||||
// Normalize the domain as punycode, note the extra
|
||||
// validation step for domain name write operations.
|
||||
instance.Domain, err = util.PunifyValidate(instance.Domain)
|
||||
instance.Domain, err = util.PunifySafely(instance.Domain)
|
||||
if err != nil {
|
||||
return gtserror.Newf("error punifying domain %s: %w", instance.Domain, err)
|
||||
}
|
||||
|
|
@ -356,7 +356,7 @@ func (i *instanceDB) GetInstanceAccounts(ctx context.Context, domain string, max
|
|||
var err error
|
||||
|
||||
// Normalize the domain as punycode
|
||||
domain, err = util.Punify_(domain)
|
||||
domain, err = util.Punify(domain)
|
||||
if err != nil {
|
||||
return nil, gtserror.Newf("error punifying domain %s: %w", domain, err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue