http://git.qwik.i2p/BurnyLlama/digivote/commit/26fcf540cc2ff701b2f973abee2cd317f0363fca.patch
.
+ * @param {Request} req
+ * @param {Response} res
+ * @returns {Function}
+ */
+export default function routex(req, res) {
+ if (req.baseUrl === "/api")
+ return function(_, data, success, __) {
+ if (success)
+ return res.json(
+ { success
+ , response: data
+ }
+ )
+
+ return res.json(
+ { success
+ , response: data.error
+ }
+ ...