From b502075cb3073c3324cba681883fbb628092526d Mon Sep 17 00:00:00 2001 From: C-3PO Date: Thu, 21 Jun 2018 20:11:10 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Moving=20product=20into=20?= =?UTF-8?q?function=20signature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/getFileContents.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/getFileContents.ts b/src/getFileContents.ts index 1f64ac2..39ef6c0 100644 --- a/src/getFileContents.ts +++ b/src/getFileContents.ts @@ -1,8 +1,6 @@ import * as http from 'http'; -export const getFileContents: () => Promise = () => new Promise((resolve, reject) => { - const product = 'assets_swtor_de_de'; - +export const getFileContents: (product?: string) => Promise = (product: string = 'assets_swtor_de_de') => new Promise((resolve, reject) => { //Generate URL const url = `http://cdn-patch.swtor.com/patch/${product}/${product}_-1to0.solidpkg`; const path = `/patch/${product}/${product}_-1to0.solidpkg`;