Skip to content

Commit

Permalink
fix: pin status metrics returns data object
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Nov 15, 2021
1 parent c6a7171 commit fa31982
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/db/postgres/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ const pinStatusMapping = {

export async function getPinStatusMetrics (client, key) {
const pinStatus = pinStatusMapping[key]
const { count, error } = await client.rpc('pin_from_status_total', { query_status: pinStatus })
const { data, error } = await client.rpc('pin_from_status_total', { query_status: pinStatus })

if (error) {
throw new DBError(error)
}

return {
total: count
total: data[0].pin_from_status_total
}
}

0 comments on commit fa31982

Please sign in to comment.