diff --git a/src/functions/auctions.ts b/src/functions/auctions.ts index 6bad7e9..d0927a7 100644 --- a/src/functions/auctions.ts +++ b/src/functions/auctions.ts @@ -8,10 +8,10 @@ import { Config } from "../types/shared"; async function handler(config: Config, body: TopsortAuction): Promise { let url: URL; try { - url = new URL(`${config.host || baseURL}/${apis.auctions}`); + url = new URL(apis.auctions, config.host || baseURL); } catch (error) { throw new AppError(400, "Invalid URL", { - error: `Invalid URL: ${config.host || baseURL}/${apis.auctions}`, + error: `Invalid URL: ${error}`, }); }