rework endpoints and enable setting custom marketplace urls

This commit is contained in:
Matt Hill
2021-07-14 16:43:25 -06:00
committed by Aiden McClelland
parent 16f5764f74
commit 6d92c195e9
24 changed files with 397 additions and 439 deletions

View File

@@ -44,9 +44,11 @@ export class HttpService {
if (isRpcSuccess(res)) return res.result
}
async simpleGet (url: string): Promise<object> {
const data = await this.http.get(url).toPromise()
return data
async simpleGet<T> (url: string, params: { [param: string]: string | string[] } = { }): Promise<T> {
Object.keys(params).forEach(key => {
if (!params[key]) delete params[key]
})
return this.http.get<T>(url, { params }).toPromise()
}
async httpRequest<T> (httpOpts: HttpOptions): Promise<T> {