db/relays: normalize url before inserting
This commit is contained in:
parent
2ff40c8fc5
commit
5c02fd0773
|
@ -6,7 +6,7 @@ function addRelays(relays: `wss://${string}`[]) {
|
|||
if (!relays.length) return Promise.resolve();
|
||||
|
||||
const values = relays.map((url) => ({
|
||||
url,
|
||||
url: new URL(url).toString(),
|
||||
domain: tldts.getDomain(url)!,
|
||||
active: true,
|
||||
}));
|
||||
|
|
Loading…
Reference in New Issue