mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-27 19:13:44 +03:00
14 lines
276 B
JavaScript
14 lines
276 B
JavaScript
'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;
|
|
}
|