0x-pankaj / our_youtube_backend

a complete youtube backend in js
3 stars 1 forks source link

video.controller.js #2

Open padariya-tech opened 8 months ago

padariya-tech commented 8 months ago

in above file when we call get video by id than how the view count will be increasing

0x-pankaj commented 8 months ago

just solved the issue by one extra call to database to update current videos videos by one but i will do more efficent way as creating views model and doing aggregation their