Renamed many components + started implementing lazy loading

This commit is contained in:
X4Lo committed 2024-04-05 22:12:05 +00:00
1 parent c8578ccf77
commit 60b517500f
80 files changed
+274 -242

No files matched your search

@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { List } from '../../shared/models/list.model';
import { UserCollection } from '../../shared/models/userCollection.model';
import { ListEntry } from '../../shared/models/listEntry.model';
import { Entry } from '../../shared/models/entry.model';
@@ -13,18 +13,18 @@ export class ListService {
constructor(private http: HttpClient) {}
// get all lists
getLists(): Observable<List[]> {
return this.http.get<List[]>(`${this.backend_apiUrl}/lists`);
getLists(): Observable<UserCollection[]> {
return this.http.get<UserCollection[]>(`${this.backend_apiUrl}/lists`);
}
// get a list by id
getList(id: string) {
return this.http.get<List[]>(`${this.backend_apiUrl}/lists/${id}`);
return this.http.get<UserCollection[]>(`${this.backend_apiUrl}/lists/${id}`);
}
// Create a new list
createList(list: List): Observable<List> {
return this.http.post<List>(`${this.backend_apiUrl}/lists`, list);
createList(list: UserCollection): Observable<UserCollection> {
return this.http.post<UserCollection>(`${this.backend_apiUrl}/lists`, list);
}
// Delete a list by ID