mirror of
https://github.com/stakwork/sphinx-relay.git
synced 2026-08-18 13:09:07 +02:00
19 lines
No EOL
281 B
TypeScript
19 lines
No EOL
281 B
TypeScript
function success(res, json) {
|
|
res.status(200);
|
|
res.json({
|
|
success: true,
|
|
response: json,
|
|
});
|
|
res.end();
|
|
}
|
|
|
|
function failure(res, e) {
|
|
res.status(400);
|
|
res.json({
|
|
success: false,
|
|
error: (e&&e.message) || e,
|
|
});
|
|
res.end();
|
|
}
|
|
|
|
export {success, failure} |