This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tiposDeApresentacoes = require('valueObjects').tiposDeApresentacoes; | |
var apresentacaoSchema = new Schema({ | |
tipo: [{ type: String, enum: tiposDeApresentacoes }], | |
titulo: { type: String, max: 80 }, | |
descricao: { type: String, max: 200 } | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.tiposDeApresentacoes = ['Debate', 'Palestra', 'WorkShop', 'StandUP', 'Mesa Redonda']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var router = express.Router(); | |
var formidable = require('formidable'); | |
var Uploader = require('../helpers/s3-uploader'); | |
router.post('/enviar', function (req, res, next) { | |
var form = new formidable.IncomingForm(); | |
form.parse(req, function(err, fields, files) { | |
if (err) { | |
return next(err); |