2017-12-21 04:28:43 +00:00
|
|
|
import { Injectable } from "@angular/core";
|
|
|
|
import { Http } from "@angular/http";
|
2018-03-24 23:16:52 +00:00
|
|
|
import { FE_ScalarAccountResponse } from "../../models/scalar-server-responses";
|
|
|
|
import { AuthedApi } from "../authed-api";
|
2017-12-21 04:28:43 +00:00
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
export class ScalarServerApiService extends AuthedApi {
|
|
|
|
constructor(http: Http) {
|
|
|
|
super(http)
|
|
|
|
}
|
|
|
|
|
2017-12-24 09:02:57 +00:00
|
|
|
public getAccount(): Promise<FE_ScalarAccountResponse> {
|
2017-12-21 04:28:43 +00:00
|
|
|
return this.authedGet("/api/v1/scalar/account").map(res => res.json()).toPromise();
|
|
|
|
}
|
|
|
|
}
|