mirror of
1
2
Fork 0
ucaptcha/src/helpers/sendJson.js

11 lines
290 B
JavaScript

console.log(import.meta.url, ' is deprecated please use res.json() directly')
/**
* @param {import('express').Response} res
* @param {JSON} json
*/
export default (res, json) => {
res.setHeader('Content-Type', 'application/json');
res.send(`:)${JSON.stringify(json)}`);
return;
};