feat(api.dossier.modifier_annotation): stop validation only with graphql schema, also validate with our validations methods

This commit is contained in:
mfo 2024-07-24 17:48:00 +02:00
parent 8e6c5d1567
commit e63b777bd9
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC
2 changed files with 12 additions and 1 deletions

View file

@ -20,7 +20,7 @@ module Mutations
annotation.value = value
end
if annotation.save
if annotation.validate(:champs_private_value) && annotation.save
{ annotation: }
else
{ errors: annotation.errors.full_messages }