wedding-planner/app/controllers/captcha_controller.rb
bustikiller c62bb137ce
Some checks failed
Check usage of free licenses / check-licenses (pull_request) Successful in 38s
Add copyright notice / copyright_notice (pull_request) Successful in 1m3s
Run unit tests / unit_tests (pull_request) Failing after 2m51s
Merge branch 'main' into remove-wedding-date
2024-12-07 22:17:30 +00:00

20 lines
389 B
Ruby

# Copyright (C) 2024 Manuel Bustillo
class CaptchaController < ApplicationController
skip_before_action :authenticate_user!
skip_before_action :set_tenant
def create
id = LibreCaptcha.new.get_id
render json: {
id:,
media_url: media_captcha_index_url(id:)
}, status: :created
end
private
def set_tenant
ActsAsTenant.current_tenant = nil
end
end