corebasic 1.0.201 → 1.0.203
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/libs/dip.js +4 -1
- package/package.json +1 -1
package/libs/dip.js
CHANGED
|
@@ -86,13 +86,16 @@ export const idip = async (message, callback, cleanup) => {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
|
|
89
|
-
export const insertKeys = message => {
|
|
89
|
+
export const insertKeys = (message, meta) => {
|
|
90
|
+
if (!(meta instanceof DipMeta)) throw {message: 'Error: Provided meta is not an instance of DipMeta in Dip.insertKeys()'}
|
|
90
91
|
return {
|
|
91
92
|
"created": message.date, "updated": message.date,
|
|
92
93
|
"createdBy": message.meta.staff,
|
|
93
94
|
"updatedBy": message.meta.staff,
|
|
94
95
|
"createdByUser": message.meta.user,
|
|
95
96
|
"updatedByUser": message.meta.user,
|
|
97
|
+
...(meta?.company ? {"company": meta.company} : {}),
|
|
98
|
+
...(meta?.outlet ? {"outlet": meta.outlet} : {}),
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
101
|
export const updateKeys = message => {
|