Skip to content

Commit

Permalink
chore: improve url generation for auctions
Browse files Browse the repository at this point in the history
In a previous commit we improved the url generation for events but not
for auctions. This PR addresses this.

Refs: #39
  • Loading branch information
barbmarcio authored Aug 12, 2024
1 parent 25bff2b commit 3555163
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/functions/auctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { Config } from "../types/shared";
async function handler(config: Config, body: TopsortAuction): Promise<AuctionResult> {
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}`,
});
}

Expand Down

0 comments on commit 3555163

Please sign in to comment.