facg3 / Memeology

0 stars 0 forks source link

returning a string from a query function #25

Open abdhalees opened 6 years ago

abdhalees commented 6 years ago

You won't be able to test this function or use it anywhere else than your handler without parsing it back to JSON. Only stringify the result when sending it to the response.
https://github.com/facg3/Memeology/blob/0c32e439b0f62d73fa716710f2f89c9a03c9b14d/src/dynamic.js#L16

MMortaga commented 6 years ago

Thanks for pointing this out @abdhalees We tried in multiple ways to solve this, but it didn't work until we stringified it from the beginning.