redoc/lib/utils/helpers.js

14 lines
276 B
JavaScript
Raw Normal View History

2015-11-23 23:27:55 +03:00
'use strict';
export function statusCodeType(statusCode) {
let res = 'success';
if (statusCode >= 300 && statusCode < 400) {
res = 'redirect';
2015-11-23 23:56:44 +03:00
} else if (statusCode >= 400) {
2015-11-23 23:27:55 +03:00
res = 'error';
} else if (statusCode < 100) {
res = 'info';
}
return res;
}