Use cookie auth for legacy EEPROM endpoints.
This commit is contained in:
parent
f38aee7e4d
commit
fc5952dda9
2 changed files with 4 additions and 10 deletions
|
@ -1,8 +1,6 @@
|
|||
const MamiEEPROM = function(endPoint, getAuthLine) {
|
||||
const MamiEEPROM = 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';
|
||||
|
@ -40,9 +38,7 @@ const MamiEEPROM = function(endPoint, getAuthLine) {
|
|||
|
||||
const { status, body } = await $xhr.post(`${endPoint}/uploads`, {
|
||||
type: 'json',
|
||||
headers: {
|
||||
Authorization: getAuthLine(),
|
||||
},
|
||||
authed: true,
|
||||
upload: reportProgress,
|
||||
abort: handler => abortHandler = handler,
|
||||
}, formData);
|
||||
|
@ -77,9 +73,7 @@ const MamiEEPROM = function(endPoint, getAuthLine) {
|
|||
|
||||
const { status, body } = await $xhr.delete(fileInfo.urlf, {
|
||||
type: 'json',
|
||||
headers: {
|
||||
Authorization: getAuthLine(),
|
||||
},
|
||||
authed: true,
|
||||
});
|
||||
|
||||
if(status !== 204) {
|
||||
|
|
|
@ -702,7 +702,7 @@ const MamiInit = async args => {
|
|||
});
|
||||
|
||||
|
||||
ctx.eeprom = new MamiEEPROM(futami.get('eeprom2'), MamiMisuzuAuth.getLine);
|
||||
ctx.eeprom = new MamiEEPROM(futami.get('eeprom2'));
|
||||
|
||||
sbUploads.addOption({
|
||||
name: 'view',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue