[backend] [client] Import the proper userland punycode module

This commit is contained in:
Laura Hausmann 2023-11-25 03:52:14 +01:00
parent 9cc900faae
commit 13e93dc461
Signed by: zotan
GPG key ID: D044E84C5BE01605
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
import { URL } from "node:url";
import config from "@/config/index.js";
import { toASCII } from "punycode";
import punycode from "punycode/";
export function getFullApAccount(username: string, host: string | null) {
return host
@ -19,10 +19,10 @@ export function extractDbHost(uri: string) {
}
export function toPuny(host: string) {
return toASCII(host.toLowerCase());
return punycode.toASCII(host.toLowerCase());
}
export function toPunyNullable(host: string | null | undefined): string | null {
if (host == null) return null;
return toASCII(host.toLowerCase());
return punycode.toASCII(host.toLowerCase());
}

View file

@ -34,7 +34,7 @@
</template>
<script lang="ts" setup>
import { toUnicode } from "punycode";
import { toUnicode } from "punycode/";
import {} from "vue";
import { host as localHost } from "@/config";
import { $i } from "@/account";