mirror of
https://github.com/Nezumi-2711/next-gdrive-index.git
synced 2026-09-22 13:38:38 +00:00
🐞 fix: Missing supportAllDrives when getting files
This commit is contained in:
@@ -11,6 +11,8 @@ import { decryptData } from "~/utils/encryptionHelper/hash";
|
||||
import gdrive from "~/utils/gdriveInstance";
|
||||
import { getFileType } from "~/utils/previewHelper";
|
||||
|
||||
import config from "~/config/gIndex.config";
|
||||
|
||||
import FileBrowser from "../@explorer";
|
||||
import Header from "../@header";
|
||||
import HeaderButton from "../@header.button";
|
||||
@@ -102,6 +104,7 @@ export default async function RestPage({ params: { rest } }: Props) {
|
||||
const { data: file } = await gdrive.files.get({
|
||||
fileId: await decryptData(encryptedId),
|
||||
fields: "mimeType, fileExtension",
|
||||
supportsAllDrives: config.apiConfig.isTeamDrive,
|
||||
});
|
||||
if (!file.mimeType?.includes("folder")) {
|
||||
promise.push(GetFile(encryptedId));
|
||||
|
||||
@@ -258,6 +258,7 @@ export async function CheckPassword(
|
||||
{
|
||||
fileId: protectedFolder.id as string,
|
||||
alt: "media",
|
||||
supportsAllDrives: config.apiConfig.isTeamDrive,
|
||||
},
|
||||
{
|
||||
responseType: "text",
|
||||
@@ -637,6 +638,7 @@ export async function GetReadme(
|
||||
{
|
||||
fileId: data.files[0].id as string,
|
||||
alt: "media",
|
||||
supportsAllDrives: config.apiConfig.isTeamDrive,
|
||||
},
|
||||
{
|
||||
responseType: "text",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
import {
|
||||
CheckDownloadToken,
|
||||
CheckPassword,
|
||||
|
||||
Reference in New Issue
Block a user