import apiCrudPOST from "./post"; export default async function apiCrudPUT({ dbName, tableName, body, targetID }) { const updatedBody = Object.assign({}, body); if (targetID) { updatedBody["id"] = targetID; } return await apiCrudPOST({ dbName, tableName, body: updatedBody, update: true, }); }