mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 04:11:41 +00:00
21 lines
405 B
Ruby
21 lines
405 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module Api
|
||
|
module V1
|
||
|
# API para sitios
|
||
|
class SitesController < BaseController
|
||
|
# Detecta si se puede generar un certificado
|
||
|
def allowed
|
||
|
name = params[:domain].gsub(/\.#{Site.domain}\Z/, '')
|
||
|
site = Site.find_by(name: name)
|
||
|
|
||
|
if site
|
||
|
head :ok
|
||
|
else
|
||
|
head :not_found
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|