assert<- function(res,val,msg){
if(!val){
res$status <- 404
res$msg <- msg
}
}
#* Get list of available datasetsfor a user
#* @param userid userid
#* @get /datasets/available
function(userid){
assert()
MORE CODE.....
return()
}
How do I get to the result (res) parameter from within a get function in plumber? I'm used to other API in flask and js which usually carry the req,res,(next) parameters at the top of the function. But here the request params are passed directly to the function.
How do I get to the result (res) parameter from within a get function in plumber? I'm used to other API in flask and js which usually carry the req,res,(next) parameters at the top of the function. But here the request params are passed directly to the function.