Adds the new shows admin screen and drives schedule from it

This commit is contained in:
2026-06-22 04:19:51 +00:00
parent e627fe3637
commit eb9a00f21a
28 changed files with 546 additions and 54 deletions
+24
View File
@@ -0,0 +1,24 @@
import { Injectable, inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { firstValueFrom } from 'rxjs';
import { getAppConfig } from './app-config.service';
/** Shared service for uploading image files via the admin API. */
@Injectable({
providedIn: 'root',
})
export class UploadService {
private http = inject(HttpClient);
private baseUrl = `${getAppConfig().apiBaseUrl}/api/upload/image`;
/** Upload an image file. Returns the relative URL (e.g. `uploads/abc123.png`). */
async uploadImage(file: File): Promise<string> {
const formData = new FormData();
formData.append('file', file);
const response = await firstValueFrom(
this.http.post<{ url: string }>(this.baseUrl, formData),
);
return response.url;
}
}