Created
February 13, 2017 20:42
-
-
Save ben-w-smith/efac55c96415158f40e4af1be00c4401 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
var res = { | |
'status': 'error', | |
'message': 'No use case for what went wrong' | |
}; | |
if( !("username" in request.params) ) { | |
res.message = "No username provided"; | |
} | |
if( !("password" in request.params) ) { | |
res.message = "No password provided"; | |
} | |
if( request.params.username == 'ben' | |
&& request.params.password == 'pass') { | |
res.status = 'success'; | |
delete res.message; | |
res.networks = ['SelectValue', 'SelectCare']; | |
} | |
function sendRes() { | |
response.body = JSON.stringify(res); | |
} | |
response.body = JSON.stringify(res); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment