mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 20:27:52 +08:00
test: redis with quit and error cases
This commit is contained in:
@@ -28,12 +28,7 @@ function responseHandler() {
|
||||
ctx.res.success = ({ statusCode, data = null, message = null }) => {
|
||||
const status = 0;
|
||||
|
||||
if (!!statusCode && statusCode < 400) {
|
||||
ctx.status = statusCode;
|
||||
} else if (!(ctx.status < 400)) {
|
||||
ctx.status = statusCodes.OK;
|
||||
}
|
||||
|
||||
ctx.status = statusCode;
|
||||
ctx.body = { status, data, message };
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user