Commit 194f4219 authored by Mauritz, Falk Marius's avatar Mauritz, Falk Marius
Browse files

Auth in Client

todo
parent e56acd32
Pipeline #6498 passed with stage
in 4 minutes and 2 seconds
......@@ -12,7 +12,7 @@
<td><b>Delete</b></td>
</tr>
<tr *ngFor="let contact of contacts" id="contact">
<tr (click)="gotoDetail(contact)">{{contact.nickname}}</tr>
<tr (click)="gotoDetail(contact)">{{contact.username}}</tr>
<td (click)="gotoDetail(contact)">{{contact.surname}}</td>
<td (click)="gotoDetail(contact)">{{contact.name}}</td>
<td (click)="gotoDetail(contact)">{{contact.email}}</td>
......
......@@ -6,7 +6,7 @@
<div>
<div *ngFor="let contact of contacts | async"
(click)="contact.delete()" class="search-result" >
{{contact.nickname}}
{{contact.username}}
</div>
</div>
</div>
......@@ -2,7 +2,6 @@ import 'package:angular/angular.dart';
import 'package:angular_forms/angular_forms.dart';
import 'package:angular_router/angular_router.dart';
import 'package:demo/src/view/components/login_component.dart';
import 'package:demo/src/view/components/mock_users.dart';
import 'package:demo/src/view/services/person_service.dart';
import '../../model/person.dart';
......@@ -21,6 +20,7 @@ class RegisterComponent implements OnInit, OnActivate {
final Router _router;
final UserService _registerService;
User user = User.zero();
String passwordWh ="";
Future<void> register() async {
......
......@@ -87,11 +87,11 @@ class ContactService {
try {
final response = await _http.get('$_contactUrl');
final List<Contact> contacts =
(_extractData(response) as List)
(_extractData(response as Response) as List)
.map((json) => Contact.fromJson(json as Map<String, dynamic>))
.toList();
contacts.retainWhere(
(h) => h.nickname.toLowerCase().contains(term.toLowerCase()));
(h) => h.username.toLowerCase().contains(term.toLowerCase()));
return contacts;
} catch (e) {
throw _handleError(e);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment