From d42409d65086a78b4465b700ba3a1647b6a1d4a7 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Tue, 7 Oct 2025 11:18:18 +1300 Subject: [PATCH] github: prevent 401 by updating auth header --- js/services/Github.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/services/Github.js b/js/services/Github.js index c9cd857..495a953 100644 --- a/js/services/Github.js +++ b/js/services/Github.js @@ -6,7 +6,7 @@ GithubStats.factory('Github', function(SettingsService, $q, $http) { token = prompt("Please enter the github auth token"); localStorage.setItem('token', token); } - var credentials = 'SchizoDuckie:' + localStorage.getItem('token'); + var credentials = localStorage.getItem('token'); var endpoints = { repos: 'https://api.github.com/users/%s/repos', @@ -26,7 +26,7 @@ GithubStats.factory('Github', function(SettingsService, $q, $http) { getRepositories: function(name) { return $http.get(getUrl('repos', name), { headers: { - Authorization: 'Basic ' + credentials + Authorization: 'Bearer ' + credentials } }).then(function(data) { return data.data; @@ -35,7 +35,7 @@ GithubStats.factory('Github', function(SettingsService, $q, $http) { getReleases: function(name, repository) { return $http.get(getUrl('releases', name, repository), { headers: { - Authorization: 'Basic ' + credentials + Authorization: 'Bearer ' + credentials } }).then(function(data) { return data.data;