From d863460fc07344da0d943f81d99798728d2abbe0 Mon Sep 17 00:00:00 2001 From: Mathieu Schimmerling Date: Tue, 2 Aug 2022 23:43:29 +0200 Subject: [PATCH] chore: improve naming --- .../7-webapp-features/1-fetch-data/angular/user.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/7-webapp-features/1-fetch-data/angular/user.service.ts b/content/7-webapp-features/1-fetch-data/angular/user.service.ts index 0e16d9b..3aec47e 100644 --- a/content/7-webapp-features/1-fetch-data/angular/user.service.ts +++ b/content/7-webapp-features/1-fetch-data/angular/user.service.ts @@ -24,14 +24,14 @@ export class UserService { loadUsers() { this.state.next({ ...initialState, loading: true }); - this.http.get('https://randomuser.me/api/?results=3').subscribe({ + this.http.get('https://randomuser.me/api/?results=3').subscribe({ next: ({ results }) => this.state.next({ ...initialState, users: results }), error: (error) => this.state.next({ ...initialState, error }), }); } } -export interface UserRes { +export interface UserResponse { results: User[]; info: any; }