mirror of
https://github.com/zoriya/flood.git
synced 2025-12-20 14:15:15 +00:00
17 lines
250 B
JavaScript
17 lines
250 B
JavaScript
'use strict';
|
|
|
|
let ajaxUtil = {
|
|
getResponseFn: (res) => {
|
|
return (data, error) => {
|
|
if (error) {
|
|
res.status(500).json(error);
|
|
return;
|
|
} else {
|
|
res.json(data);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
module.exports = ajaxUtil;
|