import path from "path"; import queryDSQLAPI from "../../functions/api/query-dsql-api"; import grabAPIBasePath from "../../utils/grab-api-base-path"; export default async function apiCrudDELETE({ dbName, tableName, deleteSpec, targetID }) { const basePath = grabAPIBasePath({ paradigm: "crud" }); const finalID = typeof targetID === "number" ? String(targetID) : targetID; const finalPath = path.join(basePath, dbName, tableName, finalID || ""); const GET_RES = await queryDSQLAPI({ method: "DELETE", path: finalPath, body: deleteSpec, }); return GET_RES; }