Changeset 56caf3d in OpenWorkouts-current


Ignore:
Timestamp:
Feb 9, 2019, 9:51:48 PM (5 years ago)
Author:
Borja Lopez <borja@…>
Branches:
current, feature/docs, master
Children:
4226ce0
Parents:
78af3d1
Message:

Fix calls to d3.json() in both weekly and monthly charts in the dashboard
and profile pages.

We were missing a setting telling d3 to keep along the authentication
cookie when doing ajax calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ow/static/js/ow.js

    r78af3d1 r56caf3d  
    162162            y = d3.scaleLinear().rangeRound([height, 0]);
    163163
    164         d3.json(url).then(function (data) {
     164        d3.json(url, {credentials: "same-origin"}).then(function (data) {
    165165            x.domain(data.map(function (d) {
    166166                return d.name;
     
    324324            y = d3.scaleLinear().rangeRound([height, 0]);
    325325
    326         d3.json(urls[url]).then(function (data) {
     326        d3.json(urls[url], {credentials: "same-origin"}).then(function (data) {
    327327            x.domain(data.map(function (d) {
    328328                return get_name_for_x(d);
Note: See TracChangeset for help on using the changeset viewer.