1
0

pass token in Authorization header instead of i property

This commit is contained in:
Hazelnoot
2025-05-08 22:40:44 -04:00
parent 2acf7fa46d
commit 2d48387f49
5 changed files with 47 additions and 13 deletions
+2 -3
View File
@@ -63,11 +63,10 @@ function fetchAccount(token: string, id?: string, forceShowDialog?: boolean): Pr
return new Promise((done, fail) => {
window.fetch(`${apiUrl}/i`, {
method: 'POST',
body: JSON.stringify({
i: token,
}),
body: '{}',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`,
},
})
.then(res => new Promise<Misskey.entities.MeDetailed | { error: Record<string, any> }>((done2, fail2) => {