Skip to content

Commit

Permalink
fix: fix missing counter from spaces table
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Jul 18, 2024
1 parent aaa560c commit 85619a8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/helpers/spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async function loadSpaces() {

while (true) {
const query = `
SELECT id, settings, flagged, verified, turbo, hibernated
SELECT id, settings, flagged, verified, turbo, hibernated, follower_count, proposal_count, vote_count
FROM spaces
WHERE deleted = 0
ORDER BY id ASC
Expand All @@ -151,7 +151,10 @@ async function loadSpaces() {
flagged: space.flagged === 1,
verified: space.verified === 1,
turbo: space.turbo === 1,
hibernated: space.hibernated === 1
hibernated: space.hibernated === 1,
follower_count: space.follower_count,
vote_count: space.vote_count,
proposal_count: space.proposal_count
}
])
);
Expand Down Expand Up @@ -263,7 +266,7 @@ async function loadSpacesMetrics() {

export async function getSpace(id: string) {
const query = `
SELECT settings, flagged, verified, turbo, hibernated, deleted
SELECT settings, flagged, verified, turbo, hibernated, deleted, follower_count, proposal_count, vote_count
FROM spaces
WHERE id = ?
LIMIT 1`;
Expand Down

0 comments on commit 85619a8

Please sign in to comment.