matrix-dimension/web/app/shared/services/AuthedApi.ts
Travis Ralston 4965b61f2d Re-wire the UI to support the new backend
This still doesn't allow editing, but it supports showing the widgets at least.
2017-12-20 21:28:43 -07:00

16 lines
422 B
TypeScript

import { Http, Response } from "@angular/http";
import { Observable } from "rxjs/Observable";
export class AuthedApi {
public static SCALAR_TOKEN: string = null;
constructor(protected http: Http) {
}
protected authedGet(url: string, qs?: any): Observable<Response> {
if (!qs) qs = {};
qs["scalar_token"] = AuthedApi.SCALAR_TOKEN;
return this.http.get(url, {params: qs});
}
}