@xuda.io/account_module 1.2.1297 → 1.2.1299
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 +3 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2917,9 +2917,10 @@ export const create_account_profile = async function (req, job_id, headers) {
|
|
|
2917
2917
|
|
|
2918
2918
|
export const update_account_profile = async function (req, job_id, headers) {
|
|
2919
2919
|
const { uid, _id } = req;
|
|
2920
|
+
const app_id = await get_account_default_project_id(uid);
|
|
2920
2921
|
const account_profile_properties = ['profile_name', 'profile_signature', 'profile_email', 'profile_picture', 'profile_avatar', 'profile_picture_obj', 'profile_avatar_obj', 'auto_respond', 'auto_respond_mode', 'auto_respond_agents'];
|
|
2921
2922
|
try {
|
|
2922
|
-
let { data: account_profile_doc } = await db_module.
|
|
2923
|
+
let { data: account_profile_doc } = await db_module.get_app_couch_doc(app_id, _id);
|
|
2923
2924
|
|
|
2924
2925
|
if (account_profile_doc.docType !== 'account_profile') {
|
|
2925
2926
|
throw new Error('not account profile doc');
|
|
@@ -2943,7 +2944,7 @@ export const update_account_profile = async function (req, job_id, headers) {
|
|
|
2943
2944
|
|
|
2944
2945
|
account_profile_doc.ts = Date.now();
|
|
2945
2946
|
|
|
2946
|
-
const save_ret = await db_module.
|
|
2947
|
+
const save_ret = await db_module.save_app_couch_doc(app_id, account_profile_doc);
|
|
2947
2948
|
|
|
2948
2949
|
return { code: 56, data: save_ret };
|
|
2949
2950
|
} catch (err) {
|