'use strict'
const syncOp = require('../operations/commit/sync')
const { validate, checkValidation } = require('../routes/helpers')
const { PATH_SCHEMA, TYPE_SCHEMA } = require('../routes/schemas')
const providerSchemas = [PATH_SCHEMA, TYPE_SCHEMA]
function commit ({ body: { path, types } }) {
return syncOp(path, types)
}
commitProvider
Commits nodes to the event log whose states no longer match with the log.
This endpoint DOES NOT accept the Node-Glob scope in the path pattern.
Two types of commits are supported:
Args:
path
- The path pattern to pick nodes which should be committed.types
- An optional array having one or both of the valuesexisting
anddeleted
. This decides the type of commit to be processed. If omitted, both types are processed.Return:
The contents of the result returned by the method is identical to the contents of the response body of the corresponding HTTP API, invoked with identical input, except when the method throws an error. In the latter case, the error message would be identical to the error response of the HTTP call.
Errors:
Any error that occurs while executing the method is thrown back to the caller.
Examples: