Skip to content

Commit c255003

Browse files
committed
Saving the new video to the DB.
1 parent d0bca36 commit c255003

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • code/ch4_app/ch4_final_video_collector/views

code/ch4_app/ch4_final_video_collector/views/videos.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import flask
22

33
from infrastructure.view_modifiers import response
4+
from services import video_service
45
from viewmodels.videos.add_video_viewmodel import AddViewViewModel
56
from viewmodels.videos.category_viewmodel import CategoryViewModel
67
from viewmodels.videos.play_viewmodel import PlayViewModel
@@ -27,6 +28,6 @@ def add_post(cat_name: str):
2728
vm = AddViewViewModel(cat_name)
2829
vm.restore_from_form()
2930

30-
# TODO: Add video here
31+
video_service.add_video(cat_name, vm.id, vm.title, vm.author, vm.view_count)
3132

3233
return flask.redirect(f'/videos/category/{cat_name}')

0 commit comments

Comments
 (0)