[refactor] account uuid

This commit is contained in:
kwaroran
2023-07-04 05:45:45 +09:00
parent e0a700ce9e
commit d05fc1e423

View File

@@ -5,6 +5,7 @@ import localforage from "localforage"
import { alertLogin, alertStore } from "../alert"
import { forageStorage, getUnpargeables, replaceDbResources } from "./globalApi"
import { encodeRisuSave } from "./risuSave"
import { v4 } from "uuid"
export class AccountStorage{
auth:string
@@ -46,7 +47,7 @@ export class AccountStorage{
}
let da:Response
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",
headers: {
'x-risu-key': key,