import queryDSQLAPI from "../../functions/api/query-dsql-api"; import path from "path"; import grabAPIBasePath from "../../utils/grab-api-base-path"; export default async function apiMediaDELETE(params) { const basePath = grabAPIBasePath({ paradigm: "media" }); const mediaID = params.mediaID ? typeof params.mediaID === "number" ? String(params.mediaID) : params.mediaID : undefined; const finalPath = path.join(basePath, mediaID || ""); const DELETE_MEDIA_RES = await queryDSQLAPI({ method: "DELETE", path: finalPath, apiKey: params.apiKey, }); return DELETE_MEDIA_RES; }