Skip to content

Commit f9f4a70

Browse files
video controller reset, package.json update, index.ts(for developement) initialized again
1 parent 1695935 commit f9f4a70

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

‎Backend/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "src/index.ts",
66
"scripts": {
77
"start": "nodemon dist/index.js",
8-
"dev": "nodemon src/index.ts",
8+
"dev": "nodemon src/index.ts",
99
"build": "rimraf dist && tsc && npx prisma generate",
1010
"postinstall": "prisma generate",
1111
"ts.check": "tsc --project tsconfig.json",

‎Backend/src/controllers/video.controller.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { deleteFilePath } from "../middlewares/multer.middleware";
33
import { ApiError } from "../utils/ApiError";
44
import { asyncHandler } from "../utils/AsyncHandler";
55
import { deleteOldImage, deleteOldVideo, uploadOnCloudinary } from "../utils/cloudinary";
6-
// import {getVideoDurationInSeconds} from "get-video-duration";
6+
//import {getVideoDurationInSeconds} from "get-video-duration";
77
import client from "../utils/redisClient";
88
const uploadVideo = asyncHandler(async(req, res)=>{
99
try {
@@ -18,8 +18,8 @@ const uploadVideo = asyncHandler(async(req, res)=>{
1818
if(!videoUpload) throw new ApiError(404, "Video cannot be uploaded")
1919
const thumbnailUpload = await uploadOnCloudinary(thumbnail[0].path)
2020
if(!thumbnailUpload) throw new ApiError(404, "Thumbnail cannot be uploaded");
21-
// const duration = await getVideoDurationInSeconds(videoUpload)
22-
// if(!duration) throw new ApiError(404, "Duration error")
21+
// const duration = await getVideoDurationInSeconds(videoUpload)
22+
// if(!duration) throw new ApiError(404, "Duration error")
2323

2424
const result = await prisma.video.create({
2525
data:{

‎Backend/src/index.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import app from "./app";
2+
const PORT = process.env.PORT;
3+
app.listen(PORT, ()=>{
4+
console.log(`Server running on ${PORT}`)
5+
})

0 commit comments

Comments
 (0)