feat: add WatchMedium field, general review editing, configurable deploy
Some checks failed
CI / Check / Test (push) Failing after 27m0s
Some checks failed
CI / Check / Test (push) Failing after 27m0s
- WatchMedium enum (cinema/streaming/tv/physical_media/download/media_server/other) - PATCH /api/v1/reviews/:id partial update (rating, comment, watched_at, watch_medium) - edit_review use case w/ ownership + remote review guard, best-effort AP Update broadcast - SPA: icon picker, edit sheet (long-press mobile / pencil desktop), watch medium badge - shared ReviewFormFields, EditableContextMenu, parse_watched_at/format_watched_at - deploy.sh parameterized (--features, --tag), CORS allows PATCH - CONTEXT.md glossary, ADR-0001 general review editing
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
} from "@tanstack/react-query"
|
||||
import {
|
||||
deleteReview,
|
||||
editReview,
|
||||
getActivityFeed,
|
||||
getDiary,
|
||||
logReview,
|
||||
@@ -13,6 +14,7 @@ import {
|
||||
import type {
|
||||
ActivityFeedQueryParams,
|
||||
DiaryQueryParams,
|
||||
EditReviewRequest,
|
||||
LogReviewRequest,
|
||||
} from "@/lib/api/diary"
|
||||
|
||||
@@ -79,6 +81,18 @@ export function useLogReview() {
|
||||
})
|
||||
}
|
||||
|
||||
export function useEditReview() {
|
||||
const qc = useQueryClient()
|
||||
return useMutation({
|
||||
mutationFn: ({ id, data }: { id: string; data: EditReviewRequest }) =>
|
||||
editReview(id, data),
|
||||
onSuccess: () => {
|
||||
qc.invalidateQueries({ queryKey: diaryKeys.all })
|
||||
qc.invalidateQueries({ queryKey: ["activity-feed"] })
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export function useDeleteReview() {
|
||||
const qc = useQueryClient()
|
||||
return useMutation({
|
||||
|
||||
Reference in New Issue
Block a user