Multiple videos can be deleted using Videos list view.

This commit is contained in:
Roland 2022-09-23 16:43:45 -06:00
parent 69e899e032
commit 00acd9d891
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
7 changed files with 79 additions and 23 deletions

View file

@ -1,5 +1,5 @@
import React, {useContext, useState} from 'react';
import {deleteVideo, favoriteVideo} from "../api";
import {deleteVideos, favoriteVideo} from "../api";
import {Link, useNavigate, useParams} from "react-router-dom";
import {humanFileSize, humanNumber, PageContainer, secondsToTimestamp, uploadDate, useTitle, VideoCard} from "./Common";
import {Confirm} from "semantic-ui-react";
@ -40,7 +40,7 @@ function VideoPage({videoFile, prevFile, nextFile, ...props}) {
const handleDeleteVideo = async (video_id) => {
try {
await deleteVideo(video_id)
await deleteVideos(video_id)
} catch (e) {
setDeleteOpen(false);
throw e;