Refactor BaseUrl string conversion

We're only using this as a string, so no need to convert it to an URL.
This commit is contained in:
Rūdolfs Ošiņš
2024-02-23 15:46:28 +00:00
parent 8f43a57984
commit 41435951c1
8 changed files with 21 additions and 24 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import type { ProjectWithListingData } from "@app/lib/projects";
import { HttpdClient } from "@httpd-client";
import { config } from "@app/lib/config";
import { baseUrlToUrl, isLocal } from "@app/lib/utils";
import { baseUrlToString, isLocal } from "@app/lib/utils";
import { getProjectsListingData } from "@app/lib/projects";
import { handleError } from "@app/views/nodes/error";
@@ -77,6 +77,6 @@ export async function loadNodeRoute(
},
};
} catch (error: any) {
return handleError(error, baseUrlToUrl(api.baseUrl).toString());
return handleError(error, baseUrlToString(api.baseUrl));
}
}