UNPKG

@buttercup/googledrive-client

Version:
17 lines (16 loc) 500 B
import { handleBadResponse } from "../request.js"; export async function deleteFile(options) { const { patcher } = options; const config = { url: `https://www.googleapis.com/drive/v3/files/${options.id}`, method: "DELETE", query: { supportsAllDrives: "true" }, headers: { Authorization: `Bearer ${options.token}` } }; const response = await patcher.execute("request", config); handleBadResponse(response); }