Skip to content

Commit

Permalink
Add subscription in create course
Browse files Browse the repository at this point in the history
  • Loading branch information
jhang-jhe-wei committed Aug 26, 2021
1 parent 0d56056 commit 1f6ad62
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/notifies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def course_notify
user = User.find_by(line_id: params[:user_id])
user.update!(crosslink_url: params[:url])
LoadCourse.new(user).perform
user.subscriptions.find_or_create_by(notify_type: "上課提醒", user_id: user.id)
render status: 200, json: {status: "OK"}
end

Expand Down

0 comments on commit 1f6ad62

Please sign in to comment.