add logic for tutorial requirement

This commit is contained in:
Kyle Drake 2024-03-01 12:50:41 -06:00
parent 01aab733bb
commit 2ff8365651
9 changed files with 32 additions and 9 deletions

View file

@ -38,5 +38,15 @@ get '/tutorial/:section/:page/?' do
@title = "#{params[:section].upcase} Tutorial - #{@page}/10"
if @page == '9'
unless csrf_safe?
signout
redirect '/'
end
current_site.tutorial_required = false
current_site.save_changes validate: false
end
erb "tutorial/layout".to_sym
end