unchained / src /utils /moveVideoFromPendingToCompleted.mts
barton
Duplicate from jbilcke-hf/VideoChain-API
53aa97a
raw
history blame contribute delete
552 Bytes
import path from "path"
import { completedFilesDirFilePath, pendingFilesDirFilePath } from "../config.mts"
import { moveFile } from "./moveFile.mts"
export const moveVideoFromPendingToCompleted = async (pendingFileName: string, completedFileName?: string) => {
if (!completedFileName) {
completedFileName = pendingFileName
}
const pendingFilePath = path.join(pendingFilesDirFilePath, pendingFileName)
const completedFilePath = path.join(completedFilesDirFilePath, completedFileName)
await moveFile(pendingFilePath, completedFilePath)
}