blob: 6f56f1a000a788ad5c70b3d63d7b7918c5731a4f [file] [log] [blame]
// Licensed to the Apache Software Foundation (ASF) under one or more contributor
// license agreements; and to You under the Apache License, Version 2.0.
/*
* This action validates the parameters passed to the hello world action and
* returns an error if any of them is missing.
*/
function main(params) {
if(params.name && params.place) {
return params;
} else {
return {
error: {
body: {
message: 'Attributes name and place are mandatory'
},
statusCode: 400,
headers: {'Content-Type': 'application/json'}
}
}
}
}