merge: Pass token in Authorization header instead of body (!1003)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1003 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
commit
59af115f72
5 changed files with 47 additions and 13 deletions
|
|
@ -908,7 +908,6 @@ function getGameImageDriveFile() {
|
|||
formData.append('file', blob);
|
||||
formData.append('name', `bubble-game-${Date.now()}.png`);
|
||||
formData.append('isSensitive', 'false');
|
||||
formData.append('i', $i.token);
|
||||
if (prefer.s.uploadFolder) {
|
||||
formData.append('folderId', prefer.s.uploadFolder);
|
||||
}
|
||||
|
|
@ -916,6 +915,9 @@ function getGameImageDriveFile() {
|
|||
window.fetch(apiUrl + '/drive/files/create', {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
headers: {
|
||||
'Authorization': `Bearer ${$i.token}`,
|
||||
},
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(f => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue