Made use of custom fetch in ModrinthUploader

This commit is contained in:
Kir_Antipov 2024-01-05 15:28:00 +00:00
parent cd9c696b4e
commit 156eade8c0

View file

@ -53,7 +53,7 @@ export class ModrinthUploader extends GenericPlatformUploader<ModrinthUploaderOp
protected async uploadCore(request: ModrinthUploadRequest): Promise<ModrinthUploadReport> {
ArgumentError.throwIfNullOrEmpty(request.id, "request.id");
const api = new ModrinthApiClient({ token: request.token.unwrap() });
const api = new ModrinthApiClient({ token: request.token.unwrap(), fetch: this._fetch });
const unfeatureMode = request.unfeatureMode ?? (request.featured ? ModrinthUnfeatureMode.SUBSET : ModrinthUnfeatureMode.NONE);
const project = await this.getProject(request.id, api);