git ssb

0+

Piet / ssb-loomio



Commit 35e94f5977ac9c3edd6e8f9b9a8bc5c33a572162

Rename error functions for clarity

Piet Geursen committed on 3/16/2018, 2:42:57 AM
Parent: 3cbada945feb3478fdc1fe814b9eb9edaab26763

Files changed

errors/sync/isPositionChoiceError.jschanged
errors/sync/isPositionLateError.jschanged
errors/sync/isPositionTypeError.jschanged
errors/sync/isPostionError.jschanged
errors/sync/isPositionChoiceError.jsView
@@ -1,12 +1,12 @@
11 const Validator = require('is-my-json-valid')
22 const schema = require('../schema/positionChoiceError')
33 const validator = Validator(schema, {verbose: true})
44
5-module.exports = function isError (obj) {
5+module.exports = function isPositionChoiceError (obj) {
66 const result = validator(obj)
77
88 // exposes error messages provided by is-my-json-valid
9- isError.errors = validator.errors
9+ isPositionChoiceError.errors = validator.errors
1010
1111 return result
1212 }
errors/sync/isPositionLateError.jsView
@@ -2,12 +2,12 @@
22 const schema = require('../schema/positionLateError')
33 const validator = Validator(schema, {verbose: true})
44
55 // server is not used here. Closure pattern is just for consistency of use with other functions.
6-module.exports = function isError (obj) {
6+module.exports = function isPositionLateError (obj) {
77 const result = validator(obj)
88
99 // exposes error messages provided by is-my-json-valid
10- isError.errors = validator.errors
10+ isPositionLateError.errors = validator.errors
1111
1212 return result
1313 }
errors/sync/isPositionTypeError.jsView
@@ -2,12 +2,12 @@
22 const schema = require('../schema/positionTypeError')
33 const validator = Validator(schema, {verbose: true})
44
55 // server is not used here. Closure pattern is just for consistency of use with other functions.
6-module.exports = function isError (obj) {
6+module.exports = function isPostitionTypeError (obj) {
77 const result = validator(obj)
88
99 // exposes error messages provided by is-my-json-valid
10- isError.errors = validator.errors
10+ isPostitionTypeError.errors = validator.errors
1111
1212 return result
1313 }
errors/sync/isPostionError.jsView
@@ -2,12 +2,12 @@
22 const schema = require('../schema/postionError')
33 const validator = Validator(schema, {verbose: true})
44
55 // server is not used here. Closure pattern is just for consistency of use with other functions.
6-module.exports = function isError (obj) {
6+module.exports = function isPositionError (obj) {
77 const result = validator(obj)
88
99 // exposes error messages provided by is-my-json-valid
10- isError.errors = validator.errors
10+ isPositionError.errors = validator.errors
1111
1212 return result
1313 }

Built with git-ssb-web