frontend/public: don't require etag header

This commit is contained in:
nemunaire 2018-01-26 11:57:12 +01:00
parent ff98bfa79f
commit fb89ca5938
1 changed files with 4 additions and 4 deletions

View File

@ -125,7 +125,7 @@ angular.module("FICApp")
.controller("DataController", function($scope, $http, $rootScope, $interval) {
var refreshScene = function() {
$http.get(window.location.pathname.replace(".html", ".json")).then(function(response) {
if ($scope.lastpublicetag == response.headers().etag)
if ($scope.lastpublicsetag != undefined && $scope.lastpublicsetag == response.headers().etag)
return;
$scope.lastpublicetag = response.headers().etag;
@ -134,7 +134,7 @@ angular.module("FICApp")
}
var refreshData = function() {
$http.get("/my.json").then(function(response) {
if ($scope.lastmyetag == response.headers().etag)
if ($scope.lastmyetag != undefined && $scope.lastmyetag == response.headers().etag)
return;
$scope.lastmyetag = response.headers().etag;
@ -147,7 +147,7 @@ angular.module("FICApp")
$scope.settings = response.data;
});
$http.get("/themes.json").then(function(response) {
if ($scope.lastthemeetag == response.headers().etag)
if ($scope.lastthemeetag != undefined && $scope.lastthemeetag == response.headers().etag)
return;
$scope.lastthemeetag = response.headers().etag;
@ -164,7 +164,7 @@ angular.module("FICApp")
}, themes);
});
$http.get("/teams.json").then(function(response) {
if ($scope.lastteametag == response.headers().etag)
if ($scope.lastteametag != undefined && $scope.lastteametag == response.headers().etag)
return;
$scope.lastteametag = response.headers().etag;