mirror of
https://github.com/System-End/theseus.git
synced 2026-04-19 22:15:09 +00:00
22 lines
452 B
Ruby
22 lines
452 B
Ruby
class TasksController < ApplicationController
|
|
skip_after_action :verify_authorized
|
|
before_action :find_tasks
|
|
|
|
def badge
|
|
render :badge, layout: false
|
|
end
|
|
|
|
def show
|
|
render :show
|
|
end
|
|
|
|
def refresh
|
|
User::UpdateTasksJob.perform_now(current_user)
|
|
redirect_to tasks_path
|
|
end
|
|
|
|
def find_tasks
|
|
@tasks = Rails.cache.read("user_tasks/#{current_user.id}")
|
|
@tasks ||= User::UpdateTasksJob.perform_now(current_user)
|
|
end
|
|
end
|