@smartico/public-api 0.0.242 → 0.0.243
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/Jackpots/JackpotPublicMeta.d.ts +5 -1
- package/dist/Level/LevelPublicMeta.d.ts +5 -1
- package/dist/Raffle/Raffle.d.ts +5 -1
- package/dist/SmarticoLib/index.d.ts +5 -1
- package/dist/WSAPI/WSAPITypes.d.ts +5 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +4 -1
- package/dist/index.modern.mjs.map +1 -1
- package/package.json +1 -1
- package/src/IntUtils.ts +1 -1
- package/src/Jackpots/JackpotPublicMeta.ts +5 -1
- package/src/Level/LevelPublicMeta.ts +5 -1
- package/src/Raffle/Raffle.ts +5 -1
- package/src/SmarticoLib/index.ts +5 -1
- package/src/WSAPI/WSAPI.ts +5 -0
- package/src/WSAPI/WSAPITypes.ts +5 -1
package/dist/index.modern.mjs
CHANGED
|
@@ -199,7 +199,7 @@ IntUtils.JsonOrText = str => {
|
|
|
199
199
|
return str;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
return str;
|
|
202
|
+
return str || {};
|
|
203
203
|
};
|
|
204
204
|
// public static wsTimeToEpoch = (time: string): number => {
|
|
205
205
|
// if (time) {
|
|
@@ -2284,6 +2284,9 @@ class WSAPI {
|
|
|
2284
2284
|
jackpots = await OCache.use(onUpdateContextKey.Jackpots, ECacheContext.WSAPI, async function () {
|
|
2285
2285
|
const _jackpots = await _this.api.jackpotGet(null, filter);
|
|
2286
2286
|
const _pots = _jackpots.items.map(jp => jp.pot);
|
|
2287
|
+
_jackpots.items.forEach(jp => {
|
|
2288
|
+
jp.jp_public_meta.custom_data = IntUtils.JsonOrText(jp.jp_public_meta.custom_data);
|
|
2289
|
+
});
|
|
2287
2290
|
OCache.set(onUpdateContextKey.Pots, _pots, ECacheContext.WSAPI, JACKPOT_POT_CACHE_SEC);
|
|
2288
2291
|
return _jackpots.items;
|
|
2289
2292
|
}, JACKPOT_TEMPLATE_CACHE_SEC);
|