upgrade and migrate
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {ReplaySubject, of} from 'rxjs';
|
||||
import {HttpClient, HttpHeaders} from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ReplaySubject, of } from 'rxjs';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
|
||||
import {environment} from './../../environments/environment';
|
||||
import { environment } from './../../environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@@ -27,6 +27,7 @@ export class AuthService {
|
||||
return this.http.get(environment.apiUrl + "/auth/me");
|
||||
}
|
||||
|
||||
|
||||
login(loginModel) {
|
||||
return this.http.post(environment.apiUrl + "/auth/login", loginModel);
|
||||
}
|
||||
@@ -37,11 +38,15 @@ export class AuthService {
|
||||
|
||||
passwordRequest(username) {
|
||||
const headers = new HttpHeaders().set('Content-Type', 'text/plain; charset=utf-8');
|
||||
return this.http.post(environment.apiUrl + "/auth/password/request", username, {headers, responseType: 'text'});
|
||||
return this.http.post(environment.apiUrl + "/auth/password/request", username, { headers, responseType: 'text' });
|
||||
}
|
||||
|
||||
passwordReset(model) {
|
||||
const headers = new HttpHeaders().set('Content-Type', 'text/plain; charset=utf-8');
|
||||
return this.http.post(environment.apiUrl + "/auth/password/reset", model);
|
||||
}
|
||||
|
||||
setAlias(alias) {
|
||||
return this.http.post(environment.apiUrl + "/auth/alias", alias);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user