Merge pull request #8928 from tchak/feat-api-public-stats

ETQ citoyen, je voudrais avoir accès aux statistiques des démarches closes
This commit is contained in:
Paul Chavard 2023-04-19 19:11:34 +00:00 committed by GitHub
commit 39ba03783a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ class API::Public::V1::StatsController < API::Public::V1::BaseController
private
def retrieve_procedure
@procedure = Procedure.publiees_ou_brouillons.opendata.find_by(id: params[:id])
@procedure = Procedure.opendata.find_by(id: params[:id])
render_not_found("procedure", params[:id]) if @procedure.blank?
end
end

View file

@ -62,7 +62,7 @@ RSpec.describe API::Public::V1::StatsController, type: :controller do
end
context 'when the procedure is not publiee and not brouillon' do
it_behaves_like 'the procedure is not found' do
it_behaves_like 'the procedure is found' do
let(:procedure) { create(:procedure, :closed) }
end
end