2
0

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
parent 3f743b1a07
commit adf812efb3
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