<commit_before>import { Injectable }    from '@angular/core';  
import { User } from '../class/user';  
import {Http, Response,Headers,RequestOptions} from '@angular/http';

import {Team } from '../class/team';  
import {Skill } from '../class/Skill';  
import 'rxjs/add/operator/map';  
import {Observable} from 'rxjs/Observable';
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/do';
import 'rxjs/add/observable/throw';
import 'rxjs/add/operator/toPromise';



@Injectable()
export class SrvSkillService  {

  urlSkills='api/skills';
  urlSkillsAPI='api/skills';
  urlUsers='api/users';
  private headers = new Headers({'Content-Type': 'application/json'});
  constructor(private _http: Http) {  }

  create(name: string): Promise<Skill> {
    return this._http
<<<<<<< HEAD
    .post(this.urlUsers, JSON.stringify({name: name}), {headers: this.headers})
=======
      .post(this.urlSkills, JSON.stringify({name: name}), {headers: this.headers})
>>>>>>> a13f5ac9c6aa1a59e8e843a1f367bbf23ab9b504
      .toPromise()
      .then(res => res.json().data as Skill)
      .catch(this.handleError);
  }
  getAllSkills(): Promise<Skill> { 
    //return  this._http.get(this.urlFiche+'id').map((response : Response)=> <Fiche[]> response.json()).toPromise();
    return this._http.get(this.urlSkills)<commit_msg>pull push<commit_after>import { Injectable }    from '@angular/core';  
import { User } from '../class/user';  
import {Http, Response,Headers,RequestOptions} from '@angular/http';

import {Team } from '../class/team';  
import {Skill } from '../class/Skill';  
import 'rxjs/add/operator/map';  
import {Observable} from 'rxjs/Observable';
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/do';
import 'rxjs/add/observable/throw';
import 'rxjs/add/operator/toPromise';



@Injectable()
export class SrvSkillService  {

  urlSkills='api/skills';
  urlSkillsAPI='api/skills';
  urlUsers='api/users';
  private headers = new Headers({'Content-Type': 'application/json'});
  constructor(private _http: Http) {  }

  create(name: string): Promise<Skill> {
    return this._http

      .post(this.urlSkills, JSON.stringify({name: name}), {headers: this.headers})
      .toPromise()
      .then(res => res.json().data as Skill)
      .catch(this.handleError);
  }
  getAllSkills(): Promise<Skill> { 
    //return  this._http.get(this.urlFiche+'id').map((response : Response)=> <Fiche[]> response.json()).toPromise();
    return this._http.get(this.urlSkills)
{'fraction_non_alphanumeric': 0.17841669948798738, 'fraction_numerical': 0.00866482867270579, 'mean_word_length': 4.369978858350952, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 20, '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': '1533097', 'n_tokens_mistral': 879, 'n_tokens_neox': 859, 'n_words': 161}