add flags to help to decide preview type

This commit is contained in:
myl7
2022-01-24 15:52:45 +08:00
parent fad501a562
commit d3d69849c9
4 changed files with 28 additions and 13 deletions
+3 -3
View File
@@ -182,7 +182,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const { data: identityData } = await axios.get(requestUrl, {
headers: { Authorization: `Bearer ${accessToken}` },
params: {
select: '@microsoft.graph.downloadUrl,name,size,id,lastModifiedDateTime,folder,file',
select: '@microsoft.graph.downloadUrl,name,size,id,lastModifiedDateTime,folder,file,video',
},
})
@@ -191,12 +191,12 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
headers: { Authorization: `Bearer ${accessToken}` },
params: next
? {
select: '@microsoft.graph.downloadUrl,name,size,id,lastModifiedDateTime,folder,file',
select: '@microsoft.graph.downloadUrl,name,size,id,lastModifiedDateTime,folder,file,video',
top: siteConfig.maxItems,
$skipToken: next,
}
: {
select: '@microsoft.graph.downloadUrl,name,size,id,lastModifiedDateTime,folder,file',
select: '@microsoft.graph.downloadUrl,name,size,id,lastModifiedDateTime,folder,file,video',
top: siteConfig.maxItems,
},
})