Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_startup_js.html.haml « layouts « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3eb68df07c6d7d44e94bd8283d721b25215e03af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
- return unless page_startup_api_calls.present?

= javascript_tag nonce: true do
  :plain
    var gl = window.gl || {};
    gl.startup_calls = #{page_startup_api_calls.to_json};
    if (gl.startup_calls && window.fetch) {
      Object.keys(gl.startup_calls).forEach(apiCall => {
        gl.startup_calls[apiCall] = {
          fetchCall: fetch(apiCall)
        };
      });
    }