@xuda.io/account_module 1.2.1616 → 1.2.1618
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 -6
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2137,7 +2137,7 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
|
|
|
2137
2137
|
}
|
|
2138
2138
|
await update_contact_profile_picture_status(uid, contact_id, 2);
|
|
2139
2139
|
if (!contact_obj.profile_picture) {
|
|
2140
|
-
const cache = await get_xuda_cache(uid, 'profile_picture', contact_obj.email,
|
|
2140
|
+
const cache = await get_xuda_cache(uid, 'profile_picture', contact_obj.email, 'file');
|
|
2141
2141
|
let file_ret = { code: 1, data: cache };
|
|
2142
2142
|
|
|
2143
2143
|
if (!cache) {
|
|
@@ -2160,7 +2160,7 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
|
|
|
2160
2160
|
}
|
|
2161
2161
|
|
|
2162
2162
|
if (!contact_obj.profile_avatar) {
|
|
2163
|
-
const cache = await get_xuda_cache(uid, 'profile_avatar', contact_obj.email,
|
|
2163
|
+
const cache = await get_xuda_cache(uid, 'profile_avatar', contact_obj.email, 'file');
|
|
2164
2164
|
let file_ret = { code: 1, data: cache };
|
|
2165
2165
|
|
|
2166
2166
|
if (!cache) {
|
|
@@ -3020,10 +3020,10 @@ export const find_contact_query = async function (uid, opt) {
|
|
|
3020
3020
|
return ret;
|
|
3021
3021
|
};
|
|
3022
3022
|
|
|
3023
|
-
export const save_xuda_cache = async function (uid, docType,
|
|
3023
|
+
export const save_xuda_cache = async function (uid, docType, key, file, metadata = {}) {
|
|
3024
3024
|
let doc = {
|
|
3025
3025
|
_id: await _common.xuda_get_uuid('cache'),
|
|
3026
|
-
|
|
3026
|
+
key: key.toLowerCase().trim(),
|
|
3027
3027
|
docType,
|
|
3028
3028
|
uid,
|
|
3029
3029
|
file,
|
|
@@ -3035,9 +3035,9 @@ export const save_xuda_cache = async function (uid, docType, name, file, metadat
|
|
|
3035
3035
|
return save_ret;
|
|
3036
3036
|
};
|
|
3037
3037
|
|
|
3038
|
-
export const get_xuda_cache = async function (uid, docType,
|
|
3038
|
+
export const get_xuda_cache = async function (uid, docType, key, return_property) {
|
|
3039
3039
|
let ret = await db_module.find_couch_query('xuda_cache', {
|
|
3040
|
-
selector: { docType,
|
|
3040
|
+
selector: { docType, key: key.toLowerCase().trim() },
|
|
3041
3041
|
limit: 1,
|
|
3042
3042
|
});
|
|
3043
3043
|
if (ret.docs.length) {
|