debian-mirror-gitlab/app/assets/javascripts/lib/utils/favicon_ci.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
395 B
JavaScript
Raw Normal View History

2021-03-08 18:12:59 +05:30
import axios from './axios_utils';
import { setFaviconOverlay, resetFavicon } from './favicon';
export const setCiStatusFavicon = (pageUrl) =>
axios
.get(pageUrl)
.then(({ data }) => {
if (data && data.favicon) {
return setFaviconOverlay(data.favicon);
}
return resetFavicon();
})
.catch((error) => {
resetFavicon();
throw error;
});