Use relative path for API

This allows use behind reverse proxies that modify the path
This commit is contained in:
Thomas Wade 2022-05-15 15:53:08 +09:30
parent 9839997ad7
commit 8056d2849e
Signed by: tom
GPG Key ID: CC76492CBE11E715

View File

@ -18,7 +18,7 @@ app.controller("mates", ["$scope", "$http", "$interval", function($scope, $http,
$scope.lastMate = ""; $scope.lastMate = "";
$http.get("/mates") $http.get("mates")
.then((r) => .then((r) =>
{ {
var json = angular.fromJson(r.data); var json = angular.fromJson(r.data);
@ -33,7 +33,7 @@ app.controller("mates", ["$scope", "$http", "$interval", function($scope, $http,
// Don't bother updating during a cooldown // Don't bother updating during a cooldown
if ($scope.cooldown) return; if ($scope.cooldown) return;
$http.post("/mates") $http.post("mates")
.then((r) => .then((r) =>
{ {
var json = angular.fromJson(r.data); var json = angular.fromJson(r.data);