♻️ Moving product into function signature

This commit is contained in:
C-3PO 2018-06-21 20:11:10 +02:00
parent 561a40be63
commit b502075cb3
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -1,8 +1,6 @@
import * as http from 'http'; import * as http from 'http';
export const getFileContents: () => Promise<Buffer> = () => new Promise((resolve, reject) => { export const getFileContents: (product?: string) => Promise<Buffer> = (product: string = 'assets_swtor_de_de') => new Promise((resolve, reject) => {
const product = 'assets_swtor_de_de';
//Generate URL //Generate URL
const url = `http://cdn-patch.swtor.com/patch/${product}/${product}_-1to0.solidpkg`; const url = `http://cdn-patch.swtor.com/patch/${product}/${product}_-1to0.solidpkg`;
const path = `/patch/${product}/${product}_-1to0.solidpkg`; const path = `/patch/${product}/${product}_-1to0.solidpkg`;