chore: update Angular cache and TypeScript build info files
This commit is contained in:
@@ -7,6 +7,7 @@ export interface SearchHistoryItem {
|
||||
id: string;
|
||||
query: string;
|
||||
filters_json?: string | null;
|
||||
providers?: string[]; // Liste des providers utilisés (ex: ['yt', 'dm', 'tw'])
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -39,10 +40,16 @@ export class HistoryService {
|
||||
|
||||
// --- Search ---
|
||||
recordSearch(query: string, filters?: Record<string, any>): Observable<{ id: string; created_at: string }> {
|
||||
const url = `${this.apiBase()}/user/history/search`;
|
||||
return this.http.post<{ id: string; created_at: string }>(
|
||||
'/proxy/api/user/history/search',
|
||||
url,
|
||||
{ query, filters },
|
||||
{ withCredentials: true }
|
||||
).pipe(
|
||||
tap({
|
||||
next: (res) => console.debug('[HistoryService] Search recorded', { query, filters, res }),
|
||||
error: (err) => console.error('[HistoryService] Failed to record search', err)
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -50,13 +57,13 @@ export class HistoryService {
|
||||
const params = new URLSearchParams();
|
||||
params.set('limit', String(limit));
|
||||
if (before) params.set('before', before);
|
||||
return this.http.get<SearchHistoryItem[]>(`/proxy/api/user/history/search?${params.toString()}`, { withCredentials: true });
|
||||
return this.http.get<SearchHistoryItem[]>(`${this.apiBase()}/user/history/search?${params.toString()}`, { withCredentials: true });
|
||||
}
|
||||
|
||||
// --- Watch ---
|
||||
recordWatchStart(provider: string, videoId: string, title?: string | null, watchedAt?: string, thumbnail?: string | null, durationSeconds?: number): Observable<WatchHistoryItem> {
|
||||
return this.http.post<WatchHistoryItem>(
|
||||
'/proxy/api/user/history/watch',
|
||||
`${this.apiBase()}/user/history/watch`,
|
||||
{ provider, videoId, title: title ?? null, watchedAt, thumbnail: thumbnail ?? null, durationSeconds },
|
||||
{ withCredentials: true }
|
||||
);
|
||||
@@ -89,16 +96,16 @@ export class HistoryService {
|
||||
const params = new URLSearchParams();
|
||||
params.set('limit', String(limit));
|
||||
if (before) params.set('before', before);
|
||||
return this.http.get<WatchHistoryItem[]>(`/proxy/api/user/history/watch?${params.toString()}`, { withCredentials: true });
|
||||
return this.http.get<WatchHistoryItem[]>(`${this.apiBase()}/user/history/watch?${params.toString()}`, { withCredentials: true });
|
||||
}
|
||||
|
||||
// --- Delete single items ---
|
||||
deleteSearchItem(id: string): Observable<void> {
|
||||
return this.http.delete<void>(`/proxy/api/user/history/search/${encodeURIComponent(id)}`, { withCredentials: true });
|
||||
return this.http.delete<void>(`${this.apiBase()}/user/history/search/${encodeURIComponent(id)}`, { withCredentials: true });
|
||||
}
|
||||
|
||||
deleteWatchItem(id: string): Observable<void> {
|
||||
return this.http.delete<void>(`/proxy/api/user/history/watch/${encodeURIComponent(id)}`, { withCredentials: true });
|
||||
return this.http.delete<void>(`${this.apiBase()}/user/history/watch/${encodeURIComponent(id)}`, { withCredentials: true });
|
||||
}
|
||||
|
||||
// Recherche dans l'historique des recherches
|
||||
@@ -107,7 +114,7 @@ export class HistoryService {
|
||||
params.set('q', query);
|
||||
params.set('limit', String(limit));
|
||||
return this.http.get<SearchHistoryItem[]>(
|
||||
`/proxy/api/user/history/search?${params.toString()}`,
|
||||
`${this.apiBase()}/user/history/search?${params.toString()}`,
|
||||
{ withCredentials: true }
|
||||
);
|
||||
}
|
||||
@@ -118,7 +125,7 @@ export class HistoryService {
|
||||
params.set('q', query);
|
||||
params.set('limit', String(limit));
|
||||
return this.http.get<WatchHistoryItem[]>(
|
||||
`/proxy/api/user/history/watch?${params.toString()}`,
|
||||
`${this.apiBase()}/user/history/watch?${params.toString()}`,
|
||||
{ withCredentials: true }
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user