<commit_before>import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Http } from '@angular/http';
import { MdSnackBar } from '@angular/material';

@Component({
  selector: 'reset-password',
  styleUrls: ['./reset-components.css'],
  templateUrl: './reset.components.html'
})
export class ResetPasswordComponent {

    public currentToken: any;
    public reset: any = {};
    constructor(
        public route: ActivatedRoute,
        public http: Http,
        public snackBar: MdSnackBar,
        private router: Router
    ) {
        this.currentToken = this.route.snapshot.params['token'];
    }

    public resetPassword() {
        this.http.post('/reset/' + this.currentToken, this.reset)
            .subscribe((data) => {
                console.log(data);
            }, (error) => {
                let response = JSON.parse(error._body);
                this.openSnackBar(response.message.msg, 'OK');
            });
    }

    public openSnackBar(message: string, action: string) {
        this.snackBar.open(message, action, {
        duration: 2000,
        });
    }

}<commit_msg>Update reset page to use ApiHttp<commit_after>import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ApiHttp } from '../../api-http.service';
import { MdSnackBar } from '@angular/material';

@Component({
  selector: 'reset-password',
  styleUrls: ['./reset-components.css'],
  templateUrl: './reset.components.html'
})
export class ResetPasswordComponent {

    public currentToken: any;
    public reset: any = {};
    constructor(
        public route: ActivatedRoute,
        public http: ApiHttp,
        public snackBar: MdSnackBar,
        private router: Router
    ) {
        this.currentToken = this.route.snapshot.params['token'];
    }

    public resetPassword() {
        this.http.post('/reset/' + this.currentToken, this.reset)
            .subscribe((data) => {
                console.log(data);
            }, (error) => {
                let response = JSON.parse(error._body);
                this.openSnackBar(response.message.msg, 'OK');
            });
    }

    public openSnackBar(message: string, action: string) {
        this.snackBar.open(message, action, {
        duration: 2000,
        });
    }

}
{'fraction_non_alphanumeric': 0.13834329632792486, 'fraction_numerical': 0.0034158838599487617, 'mean_word_length': 2.430453879941435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4816000', 'n_tokens_mistral': 681, 'n_tokens_neox': 661, 'n_words': 145}