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 +1 -0
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
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({
|