Skip to content

Commit

Permalink
feat: update board create route to accept disable_signature
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsey committed Jun 19, 2020
1 parent db2f2f9 commit 1fe32a2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/ept-boards/routes/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ module.exports = {
viewable_by: Joi.number(),
postable_by: Joi.number(),
right_to_left: Joi.boolean().default(false),
disable_post_edit: Joi.number().min(0).max(99999)
disable_post_edit: Joi.number().min(0).max(99999),
disable_signature: Joi.boolean().default(false)
})).min(1)
},
pre: [
Expand All @@ -57,8 +58,12 @@ module.exports = {
handler: function(request) {
var boards = request.payload.map(function(board) {
// create each board
board.meta = { disable_post_edit: board.disable_post_edit };
board.meta = {
disable_post_edit: board.disable_post_edit,
disable_signature: board.disable_signature
};
delete board.disable_post_edit;
delete board.disable_signature;
return board;
});
var promise = Promise.map(boards, function(board) {
Expand Down

0 comments on commit 1fe32a2

Please sign in to comment.