decide.nolog.cz/tests/helpers/server-post-users.js
jelhan 682e6a658e fix coding style errors
> helpers/poll-has-users.js should pass jscs.
> requireSemicolons: Missing semicolon after statement at helpers/poll-has-users.js
is incostitent with JSHint which complains about this semicolon

other ones should be fixed by rewrite of create/options
2016-01-28 12:34:56 +01:00

13 lines
236 B
JavaScript

export default function(requestBody, id) {
if (id === null) {
id = 1;
}
let poll = JSON.parse(requestBody);
poll.user.id = id;
return [
200,
{ 'Content-Type': 'application/json' },
JSON.stringify(poll)
];
}