matrix-dimension/web/app/shared/services/scalar-server-api.service.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
484 B
TypeScript

import { Injectable } from "@angular/core";
import { Http } from "@angular/http";
import { ScalarAccountResponse } from "../models/scalar_server_responses";
import { AuthedApi } from "./AuthedApi";
@Injectable()
export class ScalarServerApiService extends AuthedApi {
constructor(http: Http) {
super(http)
}
public getAccount(): Promise<ScalarAccountResponse> {
return this.authedGet("/api/v1/scalar/account").map(res => res.json()).toPromise();
}
}