matrix-dimension/web/app/shared/services/scalar/scalar-server-api.service.ts
2017-12-24 02:03:02 -07:00

16 lines
494 B
TypeScript

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