Skip to content

Commit

Permalink
salesloft -- need to nest custom fields
Browse files Browse the repository at this point in the history
  • Loading branch information
williamstein committed Feb 27, 2024
1 parent 00e3cbe commit a15532d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/packages/server/salesloft/money.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ export async function getMoneyData(account_id: string): Promise<{
if (x.rows.length == 0) {
// no statements ever
return {
cocalc_balance: 0,
cocalc_purchase_timestamp: "0000-00-00T00:00:00.000Z",
cocalc_last_month_spend: 0,
cocalc_last_year_spend: 0,
custom_fields: {
cocalc_balance: 0,
cocalc_purchase_timestamp: "0000-00-00T00:00:00.000Z",
cocalc_last_month_spend: 0,
cocalc_last_year_spend: 0,
},
};
}
const cocalc_balance = x.rows[0].balance;
Expand Down

0 comments on commit a15532d

Please sign in to comment.