@xuda.io/account_module 1.2.1546 → 1.2.1548
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 +4 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1832,9 +1832,9 @@ export const get_account_ai_usage = async function (req, job_id, headers) {
|
|
|
1832
1832
|
const curr_month = Number(String(d.getMonth() + 1).padStart(2, '0')); // months are 0-based
|
|
1833
1833
|
const curr_year = d.getFullYear();
|
|
1834
1834
|
|
|
1835
|
-
const ai_usage = await db_module.
|
|
1836
|
-
startkey: [year || curr_year, month || curr_month, day || 0],
|
|
1837
|
-
endkey: [year || curr_year, month || curr_month, day || 99],
|
|
1835
|
+
const ai_usage = await db_module.get_couch_view('xuda_usage', 'ai_usage', {
|
|
1836
|
+
startkey: [uid, year || curr_year, month || curr_month, day || 0],
|
|
1837
|
+
endkey: [uid, year || curr_year, month || curr_month, day || 99],
|
|
1838
1838
|
reduce: true,
|
|
1839
1839
|
group_level: 999,
|
|
1840
1840
|
});
|
|
@@ -1930,7 +1930,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1930
1930
|
let account_type;
|
|
1931
1931
|
if (contact_uid) {
|
|
1932
1932
|
let { code: account_code, data: account_obj } = await db_module.get_couch_doc('xuda_accounts', contact_uid);
|
|
1933
|
-
account_info = account_obj.account_info;
|
|
1933
|
+
// account_info = account_obj.account_info;
|
|
1934
1934
|
// account_info_ret = await get_account_name({ uid_query: contact_uid });
|
|
1935
1935
|
if (account_code < 0) {
|
|
1936
1936
|
throw new Error(`account ${contact_uid} not found`);
|