<commit_before>import { SharedService } from '../../shared/shared.service';
import { UserService } from '../../shared/user.service';
import { Headers, Http, RequestOptions, Response } from '@angular/http';
import { Injectable } from '@angular/core';
import { HttpService } from '../../shared/http.service';
import { Observable } from 'rxjs/Rx';
import { User } from './user-management.interface';

@Injectable()
export class UserManagementService extends SharedService {
    private _users: any = {};

    constructor(
        protected http: HttpService,
        private userService: UserService,
    ) {
        super(http);
    }


    getUsers(id?: number, branchid?: number): Observable<any> {
        // if (id && this._users[id]) { return Observable.of(this._users[id]); }
        const url = `api/users?id=${id}&branchid=${branchid}`;
        return this.http.get(url).map((res) => res.json()).map((res) => {
            this._users[id] = res;
            return res;<commit_msg>update service due to revert changes by alok usrmgmt branch<commit_after>import { SharedService } from '../../shared/shared.service';
import { UserService } from '../../shared/user.service';
import { Headers, Http, RequestOptions, Response } from '@angular/http';
import { Injectable } from '@angular/core';
import { HttpService } from '../../shared/http.service';
import { Observable } from 'rxjs/Rx';
import { User } from './user-management.interface';

@Injectable()
export class UserManagementService extends SharedService {
    private _users: any = {};

    constructor(
        protected http: HttpService,
        private userService: UserService,
    ) {
        super(http);
    }


    getUsers(id?: number, branchid?: number): Observable<any> {
        // if (id && this._users[id]) { return Observable.of(this._users[id]); }
        const url = `api/users?id=${id}`;
        return this.http.get(url).map((res) => res.json()).map((res) => {
            this._users[id] = res;
            return res;
{'fraction_non_alphanumeric': 0.16258129064532267, 'fraction_numerical': 0.0, 'mean_word_length': 3.1493775933609958, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6740357', 'n_tokens_mistral': 565, 'n_tokens_neox': 562, 'n_words': 144}