@vibecodeapp/cloud-studio 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
mq.addEventListener('change', update);
|
|
16
16
|
})();
|
|
17
17
|
</script>
|
|
18
|
-
<script type="module" crossorigin src="/assets/index-
|
|
18
|
+
<script type="module" crossorigin src="/assets/index-C7SVavLV.js"></script>
|
|
19
19
|
<link rel="stylesheet" crossorigin href="/assets/index-Dm0NurdA.css">
|
|
20
20
|
</head>
|
|
21
21
|
<body>
|
package/dist/server/index.js
CHANGED
|
@@ -6729,6 +6729,30 @@ tableRoutes.delete("/:tableName/:id", async (c) => {
|
|
|
6729
6729
|
return handlePrismaError(error, c);
|
|
6730
6730
|
}
|
|
6731
6731
|
});
|
|
6732
|
+
tableRoutes.delete("/:tableName", async (c) => {
|
|
6733
|
+
const tableName = c.req.param("tableName");
|
|
6734
|
+
try {
|
|
6735
|
+
const { ids } = await c.req.json();
|
|
6736
|
+
if (!Array.isArray(ids) || ids.length === 0) {
|
|
6737
|
+
return c.json({ success: false, error: "ids array is required" }, 400);
|
|
6738
|
+
}
|
|
6739
|
+
const convertedIds = await Promise.all(
|
|
6740
|
+
ids.map((id) => convertIdParameter(tableName, id))
|
|
6741
|
+
);
|
|
6742
|
+
return await withModel(tableName, async (model) => {
|
|
6743
|
+
const result = await model.deleteMany({
|
|
6744
|
+
where: { id: { in: convertedIds } }
|
|
6745
|
+
});
|
|
6746
|
+
const response = {
|
|
6747
|
+
success: true,
|
|
6748
|
+
data: { deleted: result.count }
|
|
6749
|
+
};
|
|
6750
|
+
return c.json(response);
|
|
6751
|
+
});
|
|
6752
|
+
} catch (error) {
|
|
6753
|
+
return handlePrismaError(error, c);
|
|
6754
|
+
}
|
|
6755
|
+
});
|
|
6732
6756
|
|
|
6733
6757
|
// server/index.ts
|
|
6734
6758
|
var __filename = fileURLToPath(import.meta.url);
|