proxy
This commit is contained in:
@@ -47,7 +47,12 @@ export class AdminRegistrationsComponent implements OnInit {
|
||||
}
|
||||
|
||||
private load(): void {
|
||||
this.http.get<any[]>(`${this.apiBaseUrl}/admin/registrations`).subscribe({ next: (items) => this.registrations.set(items), error: (e) => this.error(e) });
|
||||
this.http
|
||||
.get<any[]>(`${this.apiBaseUrl}/admin/registrations`, {
|
||||
headers: { 'Cache-Control': 'no-cache', Pragma: 'no-cache' },
|
||||
params: { _: Date.now() },
|
||||
})
|
||||
.subscribe({ next: (items) => this.registrations.set(items), error: (e) => this.error(e) });
|
||||
}
|
||||
|
||||
private error(error: unknown): void {
|
||||
|
||||
@@ -12,20 +12,14 @@ import { API_BASE_URL } from '../shared/api-base-url';
|
||||
<section class="panel wide">
|
||||
<h1>Registrieren</h1>
|
||||
<form [formGroup]="form" (ngSubmit)="submit()">
|
||||
<div class="grid">
|
||||
<label>
|
||||
Benutzername
|
||||
<input formControlName="username" autocomplete="username">
|
||||
</label>
|
||||
<label>
|
||||
Anzeigename
|
||||
<input formControlName="displayName" autocomplete="name">
|
||||
</label>
|
||||
</div>
|
||||
<label>
|
||||
E-Mail
|
||||
<input type="email" formControlName="email" autocomplete="email">
|
||||
</label>
|
||||
<label>
|
||||
Anzeigename
|
||||
<input formControlName="displayName" autocomplete="name">
|
||||
</label>
|
||||
<label>
|
||||
Passwort
|
||||
<input type="password" formControlName="password" autocomplete="new-password">
|
||||
@@ -55,9 +49,8 @@ export class RegisterComponent {
|
||||
@Inject(API_BASE_URL) private readonly apiBaseUrl: string,
|
||||
) {
|
||||
this.form = this.fb.nonNullable.group({
|
||||
username: ['', [Validators.required, Validators.minLength(3), Validators.pattern(/^[a-zA-Z0-9._-]+$/)]],
|
||||
displayName: ['', Validators.required],
|
||||
email: ['', [Validators.required, Validators.email]],
|
||||
displayName: ['', Validators.required],
|
||||
password: ['', [Validators.required, Validators.minLength(12)]],
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user