You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
front/src/app/services/register.service.ts

18 lines
509 B

import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from '../../environments/environment';
@Injectable({
providedIn: 'root',
})
export class RegisterService {
private apiUrl = environment.apiURL;
constructor(private http: HttpClient) {}
register(username: string, password: string): Observable<any> {
return this.http.post(this.apiUrl + '/register', { username, password });
}
}