deleteFolder()

Syntax

deleteFolder(projectId: string, folderPath: string, token?: string)

Delete a folder in the project.

Parameters

Example

import { deleteFolder } from "@eueno/lib-browser";
 
const onDelete = async () => {
   if (!token) return toast.error("Token null!");
   try {
         const projectId = "112";
         const path = "NewFolder/Profile";
         const res = await deleteFolder(projectId, path);
       
     if (res.status === 200) {
       console.log("Delete successfully");
     }
   } catch (error) {
     console.error(error);
   }
 };

Response of example:

{"msg":"success"}

Last updated