Merge pull request #5817 from tchak/stop-dossiers-brouillon-leak
[GraphQL] hide dossiers brouillon from api
This commit is contained in:
commit
e63f93f8de
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ module Types
|
||||||
end
|
end
|
||||||
|
|
||||||
def dossier(number:)
|
def dossier(number:)
|
||||||
Dossier.for_api_v2.find(number)
|
Dossier.state_not_brouillon.for_api_v2.find(number)
|
||||||
rescue => e
|
rescue => e
|
||||||
raise GraphQL::ExecutionError.new(e.message, extensions: { code: :not_found })
|
raise GraphQL::ExecutionError.new(e.message, extensions: { code: :not_found })
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue