redoc/lib/utils/helpers.js

14 lines
275 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';
} else if (statusCode > 400) {
res = 'error';
} else if (statusCode < 100) {
res = 'info';
}
return res;
}