Api+App: komentarze usera - statusy przeczytania i typ USER_COMMENT (feed, profil, panel trenera)
This commit is contained in:
@@ -1094,6 +1094,11 @@ export function deleteComment(commentId: string, scope: 'me' | { userId: string
|
||||
return api(path, { method: 'DELETE' });
|
||||
}
|
||||
|
||||
/** Oznacza komentarze jako przeczytane per widz (wiersze CommentRead, idempotentne). */
|
||||
export function markCommentsRead(commentIds: string[]) {
|
||||
return api('/me/comments/read', { method: 'POST', body: { commentIds } });
|
||||
}
|
||||
|
||||
// ---------- postępy per ćwiczenie ----------
|
||||
export function useExerciseProgress() {
|
||||
return useQuery({
|
||||
|
||||
@@ -757,6 +757,8 @@ export interface ExerciseComment {
|
||||
authorName: string;
|
||||
body: string;
|
||||
createdAt: string;
|
||||
/** Stan przeczytania per widz (historia); brak pola w odpowiedzi utworzenia. */
|
||||
read?: boolean;
|
||||
}
|
||||
|
||||
export interface HistoryExercise {
|
||||
@@ -890,7 +892,7 @@ export interface ConversationThread {
|
||||
|
||||
// ---------- aktualności (feed) ----------
|
||||
export type NotificationType =
|
||||
'PLAN_READY' | 'PLAN_EDITED' | 'PLAN_SHARED' | 'GYM_DELETED' | 'TRAINER_COMMENT';
|
||||
'PLAN_READY' | 'PLAN_EDITED' | 'PLAN_SHARED' | 'GYM_DELETED' | 'TRAINER_COMMENT' | 'USER_COMMENT';
|
||||
|
||||
export interface FeedNotificationItem {
|
||||
source: 'notification';
|
||||
|
||||
Reference in New Issue
Block a user