-
-
Save jekku/177de1c46cf8e10d5252109476611233 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.returnerSwitch = (req, res, next) => { | |
switch (req.data) { | |
case 'say hi': | |
return res.send({'message': 'say hi'}); | |
case 'say goodbye': | |
return res.send({'message': 'say goodbye'}); | |
default: | |
return next('nothing to say'); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment