bigbluebutton-Github/labs/api/recordings/lib/routes.coffee
Anton Georgiev 074009012e cleaning up
2014-05-02 21:34:48 +00:00

44 lines
962 B
CoffeeScript
Executable File

Joi = require 'joi'
handlers = require './handlers'
createValidation =
attendeePW: Joi.string().max(20).required()
checksum: Joi.string().required()
meetingID: Joi.string().min(3).max(30).required()
moderatorPW: Joi.string().required()
name: Joi.string().regex(/[a-zA-Z0-9]{3,30}/)
record: Joi.boolean()
voiceBridge: Joi.string()
welcome: Joi.string()
recordingsValidation =
meetingid: Joi.string().min(3).max(45).required()
routes = [{
method: 'GET'
path: '/'
config: {
handler: handlers.index
}
}, {
method: "GET"
path: "/bigbluebutton/api/create"
config: {
handler: handlers.create
validate: {
query: createValidation
}
}
}, {
method: "GET"
path: "/recordings"
config: {
handler: handlers.recordings
validate: {
query: recordingsValidation
}
}
}]
exports.routes = routes