Add checkin notifications for starting lectures
This commit is contained in:
@@ -1,4 +1,16 @@
|
||||
class LectureController < ApplicationController
|
||||
# TODO: Pass the CSRF token to Pushcut
|
||||
skip_before_action :verify_authenticity_token, only: [:checkin]
|
||||
|
||||
def checkin
|
||||
lecture = Lecture.find(params[:id])
|
||||
|
||||
Toggl::start_time_entry(
|
||||
description: lecture.title,
|
||||
project_id: lecture.course.toggl_project,
|
||||
)
|
||||
end
|
||||
|
||||
def start
|
||||
lecture = Lecture.find(params[:id])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user