2024-12-01 18:43:28 +00:00
|
|
|
# Copyright (C) 2024 Manuel Bustillo
|
|
|
|
|
2024-12-01 19:42:25 +01:00
|
|
|
class CaptchaController < ApplicationController
|
|
|
|
skip_before_action :authenticate_user!
|
2024-12-07 12:43:08 +01:00
|
|
|
skip_before_action :set_tenant
|
2024-12-01 19:42:25 +01:00
|
|
|
def create
|
|
|
|
id = LibreCaptcha.new.get_id
|
|
|
|
render json: {
|
|
|
|
id:,
|
|
|
|
media_url: media_captcha_index_url(id:)
|
|
|
|
}, status: :created
|
|
|
|
end
|
2024-12-07 22:53:30 +01:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def set_tenant
|
|
|
|
ActsAsTenant.current_tenant = nil
|
|
|
|
end
|
2024-12-01 19:42:25 +01:00
|
|
|
end
|