deleteProject()

Syntax

deleteProject(projectId: string, token?: string)

Delete the project by project ID.

Parameters

Returns

Promise returns an object with two properties is:

  • “folders” - [ ]: array of folders name

  • “files” - [ ]: array of objects, each object includes file information

Example

import { deleteBucket } from "@eueno/lib-browser";

const onDelete = async () => {
   if (!token || !projectId) return;
   try {
     const res = await deleteProject(projectId);
     if (res?.status === 200) {
       console.log("Delete successfully");
     }
   } catch (error) {
     console.error(error);
   }
};

Response of example:

{
    "msg": "success"
}

Last updated