@xuda.io/account_module 1.2.1519 → 1.2.1521
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/index.mjs +6 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2991,6 +2991,7 @@ export const save_picture_cache = async function (uid, docType, name, file, meta
|
|
|
2991
2991
|
file,
|
|
2992
2992
|
date_created_ts: Date.now(),
|
|
2993
2993
|
metadata,
|
|
2994
|
+
hits: 0,
|
|
2994
2995
|
};
|
|
2995
2996
|
const save_ret = await db_module.save_couch_doc('xuda_cache', doc);
|
|
2996
2997
|
return save_ret;
|
|
@@ -3013,3 +3014,8 @@ export const get_picture_cache = async function (uid, docType, name, email) {
|
|
|
3013
3014
|
return ret.docs[0]?.file ?? null;
|
|
3014
3015
|
}
|
|
3015
3016
|
};
|
|
3017
|
+
|
|
3018
|
+
export const save_cache_hit = async function (_id) {
|
|
3019
|
+
let doc = await db_module.get_couch_doc('xuda_cache', _id);
|
|
3020
|
+
doc.hit++;
|
|
3021
|
+
};
|