corebasic 1.0.122 → 1.0.124
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/features.js +1 -1
- package/libs/privileges.js +3 -0
- package/package.json +1 -1
package/libs/features.js
CHANGED
|
@@ -19,7 +19,7 @@ async function loadLocalFeatures() { // For Local Testing
|
|
|
19
19
|
let data = {}
|
|
20
20
|
if (process.env.LOAD_LOCAL_FEATURES) {
|
|
21
21
|
try {
|
|
22
|
-
let url = 'https://slyp.app/slyp-dev/api/v1/features'
|
|
22
|
+
let url = process.env.APP_ENDPOINT ? `${process.env.APP_ENDPOINT}/features` : 'https://slyp.app/slyp-dev/api/v1/features'
|
|
23
23
|
let result = (await axios.get(url, { data: {}, headers: {jwt: SERVICE_ACCESS_TOKEN, service: true}, timeout: 3000 })).data
|
|
24
24
|
await Utils.stringToFile('/slyp.local.features.json', JSON.stringify(result.data, null, '\t'))
|
|
25
25
|
} catch {
|
package/libs/privileges.js
CHANGED
|
@@ -81,6 +81,9 @@ export const checkRequest = async (req) => {
|
|
|
81
81
|
req.meta = meta
|
|
82
82
|
if (req.body.feature === 'outlets.query.list') // Starting point for atleast selecting an outlet. (This is a Special Case)
|
|
83
83
|
return true
|
|
84
|
+
if (req.body.app === "Slyp")
|
|
85
|
+
return true
|
|
86
|
+
|
|
84
87
|
return await check(req.body.company, req.body.user, req.body.feature, req)
|
|
85
88
|
}
|
|
86
89
|
|