autosync_backend2 1.2.43 → 1.2.44

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/index.d.ts CHANGED
@@ -9063,6 +9063,7 @@ export declare const app: Elysia<"", {
9063
9063
  query: unknown;
9064
9064
  headers: unknown;
9065
9065
  response: {
9066
+ 200: string;
9066
9067
  422: {
9067
9068
  type: "validation";
9068
9069
  on: string;
package/dist/index.js CHANGED
@@ -154796,10 +154796,13 @@ var InspectionTemplateLogic;
154796
154796
  return result;
154797
154797
  };
154798
154798
  InspectionTemplateLogic.create = async (body, user2) => {
154799
- await db_default.insert(inspectionTemplateTable).values({
154799
+ const [res] = await db_default.insert(inspectionTemplateTable).values({
154800
154800
  ...body,
154801
154801
  companyId: user2.kind !== "ADMIN" ? user2.companyId : body.companyId
154802
+ }).returning({
154803
+ id: inspectionTemplateTable.id
154802
154804
  });
154805
+ return res.id;
154803
154806
  };
154804
154807
  InspectionTemplateLogic.update = async (id, body, user2) => {
154805
154808
  const [res] = await db_default.update(inspectionTemplateTable).set(body).where(and(eq(inspectionTemplateTable.id, id), eq(inspectionTemplateTable.companyId, user2.companyId).if(user2.kind !== "ADMIN"))).returning({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autosync_backend2",
3
- "version": "1.2.43",
3
+ "version": "1.2.44",
4
4
  "module": "src/index.ts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",