Skip to content

Commit

Permalink
Validate bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
bobvanluijt committed Apr 6, 2016
1 parent 31cf970 commit a0d5baf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions libs/weave/v1/aclEntries.js
Expand Up @@ -294,7 +294,7 @@ module.exports = {
/**
* Validate if the provide body is correct
*/
ACTIONS.validateBodyObject(weaveObject, [], (result) => {
ACTIONS.validateBodyObject(weaveObject, ['creatorEmail', 'delegator', 'id', 'key', 'kind', 'pending', 'privileges', 'role', 'scopeId', 'scopeMembership', 'scopeName', 'scopePhotoUrl', 'scopeType'], (result) => {
switch (result) {
case true:
/**
Expand Down Expand Up @@ -409,7 +409,7 @@ module.exports = {
/**
* Validate if the provide body is correct
*/
ACTIONS.validateBodyObject(weaveObject, [], (result) => {
ACTIONS.validateBodyObject(weaveObject, ['role', 'scopeId'], (result) => {
switch (result) {
case true:
/**
Expand Down
2 changes: 1 addition & 1 deletion libs/weave/v1/commands.js
Expand Up @@ -573,7 +573,7 @@ module.exports = {
/**
* Validate if the provide body is correct
*/
ACTIONS.validateBodyObject(weaveObject, [], (result) => {
ACTIONS.validateBodyObject(weaveObject, ['deviceId', 'name'], (result) => {
switch (result) {
case true:
/**
Expand Down
2 changes: 1 addition & 1 deletion libs/weave/v1/devices.js
Expand Up @@ -836,7 +836,7 @@ module.exports = {
/**
* Validate if the provide body is correct
*/
ACTIONS.validateBodyObject(weaveObject, [], (result) => {
ACTIONS.validateBodyObject(weaveObject, ['requestTimeMs', 'patches'], (result) => {
switch (result) {
case true:
/**
Expand Down
4 changes: 2 additions & 2 deletions libs/weave/v1/modelManifests.js
Expand Up @@ -177,7 +177,7 @@ module.exports = {
/**
* Validate if the provide body is correct
*/
ACTIONS.validateBodyObject(weaveObject, [], (result) => {
ACTIONS.validateBodyObject(weaveObject, ['commandDefs'], (result) => {
switch (result) {
case true:
/**
Expand Down Expand Up @@ -222,7 +222,7 @@ module.exports = {
/**
* Validate if the provide body is correct
*/
ACTIONS.validateBodyObject(weaveObject, [], (result) => {
ACTIONS.validateBodyObject(weaveObject, ['state'], (result) => {
switch (result) {
case true:
/**
Expand Down

0 comments on commit a0d5baf

Please sign in to comment.