logging & feedback
This commit is contained in:
@@ -3,7 +3,6 @@ import { Component, inject } from '@angular/core';
|
||||
import { FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { HotToastService } from '@ngxpert/hot-toast';
|
||||
import { environment } from '../../../environments/environment';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
@@ -40,7 +39,7 @@ export class RegisterComponent {
|
||||
const params = (this.route.snapshot.queryParamMap as any)["params"];
|
||||
this.redirectUri = params.redirect_uri;
|
||||
this.client_id = params.client_id;
|
||||
this.http.get<any>(environment.api_url + 'auth/', {
|
||||
this.http.get<any>('api/auth/', {
|
||||
params
|
||||
}).subscribe({
|
||||
next: (client) => {
|
||||
@@ -58,10 +57,10 @@ export class RegisterComponent {
|
||||
this.toast.error('Passwords do not match');
|
||||
return;
|
||||
}
|
||||
this.http.post(environment.api_url + 'auth/register?'+ 'client_id=' + this.client_id, this.registerForm.value).pipe(
|
||||
this.http.post('api/auth/register?'+ 'client_id=' + this.client_id, this.registerForm.value).pipe(
|
||||
this.toast.observe({
|
||||
loading: 'Registering...',
|
||||
success: 'Registration successfull'
|
||||
success: 'Registration successfull, please log in',
|
||||
})
|
||||
).subscribe({
|
||||
next: () => {
|
||||
|
||||
Reference in New Issue
Block a user