mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 09:31:43 -05:00
Update validation callbacks' debug page
The API for validation callbacks changed some time ago and the debug page was not updated to reflect this.
This commit is contained in:
parent
ce8e29fc5b
commit
ac2349f2ff
1 changed files with 11 additions and 6 deletions
|
@ -207,11 +207,12 @@ const registerCollectionCallbacks = (typeName, options) => {
|
|||
if (options.create) {
|
||||
registerCallback({
|
||||
name: `${typeName}.create.validate`,
|
||||
iterator: { document: 'The document being inserted' },
|
||||
iterator: { validationErrors: 'An array that can be used to accumulate validation errors' },
|
||||
properties: [
|
||||
{ document: 'The document being inserted' },
|
||||
{ currentUser: 'The current user' },
|
||||
{ validationErrors: 'An object that can be used to accumulate validation errors' },
|
||||
{ collection: 'The collection the document belongs to' },
|
||||
{ context: 'The context of the mutation'},
|
||||
],
|
||||
runs: 'sync',
|
||||
returns: 'document',
|
||||
|
@ -248,11 +249,13 @@ const registerCollectionCallbacks = (typeName, options) => {
|
|||
if (options.update) {
|
||||
registerCallback({
|
||||
name: `${typeName}.update.validate`,
|
||||
iterator: { data: 'The client data' },
|
||||
iterator: { validationErrors: 'An object that can be used to accumulate validation errors' },
|
||||
properties: [
|
||||
{ document: 'The document being edited' },
|
||||
{ data: 'The client data' },
|
||||
{ currentUser: 'The current user' },
|
||||
{ validationErrors: 'An object that can be used to accumulate validation errors' },
|
||||
{ collection: 'The collection the document belongs to' },
|
||||
{ context: 'The context of the mutation'},
|
||||
],
|
||||
runs: 'sync',
|
||||
returns: 'modifier',
|
||||
|
@ -296,10 +299,12 @@ const registerCollectionCallbacks = (typeName, options) => {
|
|||
if (options.delete) {
|
||||
registerCallback({
|
||||
name: `${typeName}.delete.validate`,
|
||||
iterator: { document: 'The document being removed' },
|
||||
iterator: { validationErrors: 'An object that can be used to accumulate validation errors' },
|
||||
properties: [
|
||||
{ currentUser: 'The current user' },
|
||||
{ validationErrors: 'An object that can be used to accumulate validation errors' },
|
||||
{ document: 'The document being removed' },
|
||||
{ collection: 'The collection the document belongs to'},
|
||||
{ context: 'The context of this mutation'}
|
||||
],
|
||||
runs: 'sync',
|
||||
returns: 'document',
|
||||
|
|
Loading…
Add table
Reference in a new issue