mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
15 lines
430 B
TypeScript
15 lines
430 B
TypeScript
import { Http, Response } from "@angular/http";
|
|
import { Observable } from "rxjs/Observable";
|
|
import { SessionStorage } from "../SessionStorage";
|
|
|
|
export class AuthedApi {
|
|
constructor(protected http: Http) {
|
|
}
|
|
|
|
protected authedGet(url: string, qs?: any): Observable<Response> {
|
|
if (!qs) qs = {};
|
|
qs["scalar_token"] = SessionStorage.scalarToken;
|
|
return this.http.get(url, {params: qs});
|
|
}
|
|
}
|