fix onedrive international version failing raw redirect

This commit is contained in:
spencerwooo
2022-02-14 23:35:32 +08:00
parent f514c717dc
commit 049be5d841
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -223,7 +223,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const { data } = await axios.get(requestUrl, {
headers: { Authorization: `Bearer ${accessToken}` },
params: {
select: '@microsoft.graph.downloadUrl',
// OneDrive international version fails when only selecting the downloadUrl (what a stupid bug)
select: 'id,@microsoft.graph.downloadUrl',
},
})
+2 -1
View File
@@ -64,7 +64,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const { data } = await axios.get(requestUrl, {
headers: { Authorization: `Bearer ${accessToken}` },
params: {
select: '@microsoft.graph.downloadUrl',
// OneDrive international version fails when only selecting the downloadUrl (what a stupid bug)
select: 'id,@microsoft.graph.downloadUrl',
},
})