Promact/slack-erp-custom-integration-mvc

View on GitHub
Slack.Automation/Promact.Erp.Web/app/appcomponent.service.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { Injectable } from '@angular/core';
import { Http } from "@angular/http";
import { StringConstant } from './shared/stringConstant';
import 'rxjs/add/operator/toPromise';

@Injectable()
export class AppComponentService {
    constructor(private http: Http, private stringConstant: StringConstant) { }

    /*This service used for get user is Admin or not.*
    */
    getUserIsAdminOrNot() {
        return this.http.get(this.stringConstant.oauthUrl + this.stringConstant.userIsAdmin).map(res => res.json());
    }
}