wedding-planner/app/controllers/captcha_controller.rb
Manuel Bustillo b237239a1f
Some checks failed
Check usage of free licenses / check-licenses (pull_request) Failing after 48s
Add copyright notice / copyright_notice (pull_request) Successful in 57s
Run unit tests / unit_tests (pull_request) Failing after 3m28s
Define an endpoint to retrieve a LibreCaptcha captcha
2024-12-01 19:42:25 +01:00

12 lines
246 B
Ruby

class CaptchaController < ApplicationController
skip_before_action :authenticate_user!
def create
id = LibreCaptcha.new.get_id
render json: {
id:,
media_url: media_captcha_index_url(id:)
}, status: :created
end
end