Created by rossmccrann 240 days ago Viewed 97 times 1 Point
No comments yet
import * as wmill from "https://deno.land/x/windmill@v1.70.1/mod.ts";
export async function main(
gdrive_auth: wmill.Resource<"gdrive">,
requestId: string,
drive_name: string,
) {
const supportsAllDrives = true;
const CREATE_SHARED_DRIVE_URL = `https://www.googleapis.com/drive/v3/drives/?requestId=${requestId}`;
const token = gdrive_auth["token"];
const body = {
"name": drive_name
};
const response = await fetch(CREATE_SHARED_DRIVE_URL, {
method: "POST",
body: JSON.stringify(body),
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.text();
}
No comments yet