add media page + backend + minor changes to media related stuff & sidebar

This commit is contained in:
X4Lo committed 2024-09-10 00:43:39 +01:00
1 parent c46309e458
commit eba9721a3c
20 files changed
+597 -73

No files matched your search

@@ -0,0 +1,19 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { environment } from '../../../environments/environment.prod';
import { Observable } from 'rxjs';
import { Media } from '../../shared/models/media.model';
@Injectable({
providedIn: 'root',
})
export class CustomMediaService {
private backend_apiUrl = environment.API_URL;
private apiAction = 'custom-media';
constructor(private http: HttpClient) {}
fetchCustomMedia(): Observable<Media[]> {
return this.http.get<Media[]>(`${this.backend_apiUrl}/${this.apiAction}`);
}
}