Skip to content

Commit

Permalink
feat(context): valid that scope is public, protected or private
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbeau committed Feb 23, 2017
1 parent e66a748 commit c80c214
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/contexts/context.validator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Joi from 'joi';

export const createContextModel = Joi.object().keys({
scope: Joi.string().required(),
scope: Joi.string().required().valid('public', 'protected', 'private'),
alias: Joi.string(),
properties_map: Joi.object().required().keys({
center: Joi.string(),
Expand All @@ -10,7 +10,7 @@ export const createContextModel = Joi.object().keys({
});

export const updateContextModel = Joi.object().keys({
scope: Joi.string(),
scope: Joi.string().valid('public', 'protected', 'private'),
alias: Joi.string(),
properties_map: Joi.object().required().keys({
center: Joi.string(),
Expand Down

0 comments on commit c80c214

Please sign in to comment.