[refactor] account uuid
This commit is contained in:
@@ -5,6 +5,7 @@ import localforage from "localforage"
|
|||||||
import { alertLogin, alertStore } from "../alert"
|
import { alertLogin, alertStore } from "../alert"
|
||||||
import { forageStorage, getUnpargeables, replaceDbResources } from "./globalApi"
|
import { forageStorage, getUnpargeables, replaceDbResources } from "./globalApi"
|
||||||
import { encodeRisuSave } from "./risuSave"
|
import { encodeRisuSave } from "./risuSave"
|
||||||
|
import { v4 } from "uuid"
|
||||||
|
|
||||||
export class AccountStorage{
|
export class AccountStorage{
|
||||||
auth:string
|
auth:string
|
||||||
@@ -46,7 +47,7 @@ export class AccountStorage{
|
|||||||
}
|
}
|
||||||
let da:Response
|
let da:Response
|
||||||
while((!da) || da.status === 403){
|
while((!da) || da.status === 403){
|
||||||
da = await fetch(hubURL + '/api/account/read/' + Buffer.from(key ,'utf-8').toString('hex'), {
|
da = await fetch(hubURL + '/api/account/read/' + Buffer.from(key ,'utf-8').toString('hex') + '|' + v4(), {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
'x-risu-key': key,
|
'x-risu-key': key,
|
||||||
|
|||||||
Reference in New Issue
Block a user