mirror of https://github.com/sylv/micro.git
fix: format invite urls properly
This commit is contained in:
parent
c320196ee8
commit
7bd3b8c7e1
|
@ -54,7 +54,9 @@ export class Invite {
|
|||
@Property({ persist: false })
|
||||
@Field(() => String)
|
||||
get url() {
|
||||
return `${config.rootHost.url}/${this.path}`;
|
||||
const url = new URL(config.rootHost.url);
|
||||
url.pathname = this.path;
|
||||
return url;
|
||||
}
|
||||
|
||||
[OptionalProps]: 'url' | 'path' | 'consumed' | 'expired' | 'createdAt' | 'skipVerification';
|
||||
|
|
Loading…
Reference in New Issue