forked from Trustie/forgeplus
Merge pull request '修复 target bug' (#2) from bankmulan into mulanoss_server
This commit is contained in:
commit
bcddb2a2f7
|
|
@ -14,7 +14,7 @@ class WatchersController < ApplicationController
|
|||
return normal_status(2, "你还没有关注哦") unless current_user.watched?(@target)
|
||||
current_user.unwatch!(@target)
|
||||
render_ok({watchers_count: @target.watchers_count, watched: false})
|
||||
Users::SynchronizationService.call(current_user, @target, false) if target_type == "project"
|
||||
Users::SynchronizationService.call(current_user, @target, false) if params[:target_type].to_s == "project"
|
||||
rescue Exception => e
|
||||
uid_logger_error(e.message)
|
||||
tip_exception(e.message)
|
||||
|
|
@ -27,7 +27,7 @@ class WatchersController < ApplicationController
|
|||
return normal_status(2, "你已关注了") if current_user.watched?(@target)
|
||||
current_user.watch!(@target)
|
||||
render_ok({watchers_count: @target.watchers_count, watched: true})
|
||||
Users::SynchronizationService.call(current_user, @target, true) if target_type == "project"
|
||||
Users::SynchronizationService.call(current_user, @target, true) if params[:target_type].to_s == "project"
|
||||
rescue Exception => e
|
||||
uid_logger_error(e.message)
|
||||
tip_exception(e.message)
|
||||
|
|
|
|||
Loading…
Reference in New Issue