minor style/functions renaming changes

This commit is contained in:
X4Lo committed 2024-04-16 19:13:56 +01:00
1 parent 3374aa9944
commit 8b4c0792c0
13 files changed
+95 -50

No files matched your search

@@ -1,5 +1,4 @@
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
@Injectable({
providedIn: 'root',
@@ -18,7 +17,6 @@ export class ToggleService {
document.body.classList.add('toggled');
this.isToggeled = true;
}
// document.body.classList.toggle('toggled');
}
hoverSidebar(isHovering: boolean) {
@@ -15,21 +15,21 @@ export class UserCollectionService {
constructor(private http: HttpClient) {}
// get all lists
getLists(): Observable<UserCollection[]> {
getCollections(): Observable<UserCollection[]> {
return this.http.get<UserCollection[]>(
`${this.backend_apiUrl}/${this.apiAction}`
);
}
// get a list by id
getList(userCollectionId: string) {
return this.http.get<UserCollection[]>(
getCollection(userCollectionId: string) {
return this.http.get<UserCollection>(
`${this.backend_apiUrl}/${this.apiAction}/${userCollectionId}`
);
}
// Create a new list
createList(userCollection: UserCollection): Observable<UserCollection> {
createCollection(userCollection: UserCollection): Observable<UserCollection> {
return this.http.post<UserCollection>(
`${this.backend_apiUrl}/${this.apiAction}`,
userCollection
@@ -37,14 +37,14 @@ export class UserCollectionService {
}
// Delete a list by ID
deleteList(userCollectionId: number): Observable<any> {
deleteCollection(userCollectionId: number): Observable<any> {
return this.http.delete(
`${this.backend_apiUrl}/${this.apiAction}/${userCollectionId}`
);
}
// Add an entry to a list
addEntryToList(
addEntryToCollection(
userCollectionId: number,
entryId: number,
order: number
@@ -68,7 +68,7 @@ export class UserCollectionService {
}
// Remove an entry from a list
removeEntryFromList(
removeEntryFromCollection(
userCollectionId: string,
entryId: number
): Observable<Entry> {