@@ -103,7 +103,6 @@ func (s *Server) RegisterRouters() {
103103 postRouter .GET ("/latest" , s .wrapHandler (s .PostHandler .ListLatestPosts ))
104104 postRouter .GET ("/status/:status" , s .wrapHandler (s .PostHandler .ListPostsByStatus ))
105105 postRouter .GET ("/:postID" , s .wrapHandler (s .PostHandler .GetByPostID ))
106- postRouter .PUT ("/:postID/likes" , s .wrapHandler (s .PostHandler .LikePost ))
107106 postRouter .POST ("" , s .wrapHandler (s .PostHandler .CreatePost ))
108107 postRouter .PUT ("/:postID" , s .wrapHandler (s .PostHandler .UpdatePost ))
109108 postRouter .PUT ("/:postID/status/:status" , s .wrapHandler (s .PostHandler .UpdatePostStatus ))
@@ -230,7 +229,6 @@ func (s *Server) RegisterRouters() {
230229 photoRouter .DELETE ("/:id" , s .wrapHandler (s .PhotoHandler .DeletePhoto ))
231230 photoRouter .POST ("" , s .wrapHandler (s .PhotoHandler .CreatePhoto ))
232231 photoRouter .PUT ("/:id" , s .wrapHandler (s .PhotoHandler .UpdatePhoto ))
233- photoRouter .POST ("/:id/likes" , s .wrapHandler (s .PhotoHandler .IncreasePhotoLike ))
234232 photoRouter .GET ("/teams" , s .wrapHandler (s .PhotoHandler .ListPhotoTeams ))
235233 }
236234 {
@@ -327,11 +325,14 @@ func (s *Server) RegisterRouters() {
327325 contentAPIRouter .GET ("/journals/:journalID/comments/list_view" , s .wrapHandler (s .ContentAPIJournalHandler .ListComment ))
328326 contentAPIRouter .POST ("/journals/comments" , s .wrapHandler (s .ContentAPIJournalHandler .CreateComment ))
329327
328+ contentAPIRouter .POST ("/photos/:photoID/likes" , s .wrapHandler (s .ContentAPIPhotoHandler .Like ))
329+
330330 contentAPIRouter .GET ("/posts/:postID/comments/top_view" , s .wrapHandler (s .ContentAPIPostHandler .ListTopComment ))
331331 contentAPIRouter .GET ("/posts/:postID/comments/:parentID/children" , s .wrapHandler (s .ContentAPIPostHandler .ListChildren ))
332332 contentAPIRouter .GET ("/posts/:postID/comments/tree_view" , s .wrapHandler (s .ContentAPIPostHandler .ListCommentTree ))
333333 contentAPIRouter .GET ("/posts/:postID/comments/list_view" , s .wrapHandler (s .ContentAPIPostHandler .ListComment ))
334334 contentAPIRouter .POST ("/posts/comments" , s .wrapHandler (s .ContentAPIPostHandler .CreateComment ))
335+ contentAPIRouter .POST ("/posts/:postID/likes" , s .wrapHandler (s .ContentAPIPostHandler .Like ))
335336
336337 contentAPIRouter .GET ("/sheets/:sheetID/comments/top_view" , s .wrapHandler (s .ContentAPISheetHandler .ListTopComment ))
337338 contentAPIRouter .GET ("/sheets/:sheetID/comments/:parentID/children" , s .wrapHandler (s .ContentAPISheetHandler .ListChildren ))
0 commit comments