Update video details for editing and saving
Modify the video editing modal to use a PATCH request with JSON body for updating video details via the API. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 11420304-80a9-4ef2-adff-cbdaa418ffa8 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/11420304-80a9-4ef2-adff-cbdaa418ffa8/YNIJhSt
This commit is contained in:
parent
cce4d2456f
commit
bf59448d89
BIN
attached_assets/image_1754556267832.png
Normal file
BIN
attached_assets/image_1754556267832.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 115 KiB |
@ -30,10 +30,8 @@ export default function VideoEditModal({ video, isOpen, onClose }: VideoEditModa
|
||||
|
||||
const updateVideoMutation = useMutation({
|
||||
mutationFn: async (updates: UpdateVideo) => {
|
||||
return apiRequest(`/api/videos/${video.id}`, {
|
||||
method: "PATCH",
|
||||
body: updates
|
||||
});
|
||||
const response = await apiRequest("PATCH", `/api/videos/${video.id}`, updates);
|
||||
return response.json();
|
||||
},
|
||||
onSuccess: () => {
|
||||
toast({ title: "Video uspešno posodobljen!" });
|
||||
|
||||
Loading…
Reference in New Issue
Block a user