Use cookie auth for legacy EEPROM endpoints.

This commit is contained in:
flash 2025-04-12 23:36:04 +00:00
parent ab95a803b4
commit 83dc860904
Signed by: flash
GPG key ID: 2C9C2C574D47FE3E
4 changed files with 6 additions and 8 deletions

View file

@ -1,11 +1,9 @@
#include commitment.js
#include xhr.js
var AmiEEPROM = function(endPoint, getAuthLine) {
var AmiEEPROM = function(endPoint) {
if(typeof endPoint !== 'string')
throw 'endPoint must be a string';
if(typeof getAuthLine !== 'function')
throw 'getAuthLine must be a function';
// when the pools rewrite happen, retrieve this from futami common
const appId = '1';

View file

@ -35,7 +35,7 @@
setInterval(refreshInfo, 600000);
refreshInfo(function() {
Chat.Main(auth);
Chat.Main();
ami.sockChat.open();
window.addEventListener('beforeunload', () => ami.sockChat.close());

View file

@ -310,7 +310,7 @@ var Chat = (function () {
];
function Chat() {}
Chat.Main = function(auth) {
Chat.Main = function() {
bbcodes.forEach(function(item) {
UI.bbcode.push(item);
});
@ -588,7 +588,7 @@ var Chat = (function () {
UI.RenderLanguage();
eepromInitialise(auth);
eepromInitialise();
};
Chat.InsertBBCode = function (tag, arg) {
if (arg === void 0) { arg = null; }

View file

@ -1,9 +1,9 @@
#include common.js
#include eeprom.js
var eepromInitialise = function(auth) {
var eepromInitialise = function() {
window.eepromHistory = {};
window.eepromClient = new AmiEEPROM(futami.get('eeprom2'), auth.getLine);
window.eepromClient = new AmiEEPROM(futami.get('eeprom2'));
window.eepromUploadsTable = $id('uploadHistory');
$id('uploadSelector').onchange = function() {