Fix missing terms of services link (#35115)

This commit is contained in:
David Roetzel 2025-06-21 10:59:47 +02:00 committed by GitHub
commit adf812efb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 60 additions and 3 deletions

View file

@ -15,8 +15,9 @@ class Api::V1::Instances::TermsOfServicesController < Api::V1::Instances::BaseCo
if params[:date].present?
TermsOfService.published.find_by!(effective_date: params[:date])
else
TermsOfService.live.first || TermsOfService.published.first! # For the case when none of the published terms have become effective yet
TermsOfService.current
end
end
not_found if @terms_of_service.nil?
end
end