|
module.exports = (input) => { |
|
// if body is empty for question or answer, throw |
|
return input; |
|
}; |
If you get around to implementing sanitation and checking what parameters are being sent check out the Express Validator library on npm. It has a whole bunch of convenient methods to check types, sanitize inputs and also will automatically send back helpful error messages if there is some input tests that fails.
QuestAPI/src/server/helpers/sanitizeInput.js
Lines 1 to 4 in 2c8795d
If you get around to implementing sanitation and checking what parameters are being sent check out the Express Validator library on npm. It has a whole bunch of convenient methods to check types, sanitize inputs and also will automatically send back helpful error messages if there is some input tests that fails.