template sharing

This commit is contained in:
Bastian Wagner
2026-06-18 11:18:10 +02:00
parent f77a592fc8
commit 85a43d1b08
20 changed files with 714 additions and 38 deletions

View File

@@ -39,6 +39,18 @@ export class TemplatesService {
return this.http.delete<{ message: string }>(`${this.apiUrl}/${templateId}`);
}
shareTemplate(templateId: string, userId: string): Observable<ListTemplate> {
return this.http.post<ListTemplate>(`${this.apiUrl}/${templateId}/shares`, {
userId,
});
}
removeShare(templateId: string, userId: string): Observable<ListTemplate> {
return this.http.delete<ListTemplate>(
`${this.apiUrl}/${templateId}/shares/${userId}`,
);
}
createListFromTemplate(
templateId: string,
data: CreateListFromTemplateRequest = {},