Skip to content

Commit

Permalink
fix: Use domain field
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR committed Oct 10, 2024
1 parent b90ddaa commit b3a797d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/helpers/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@ export async function getSpace(id: string, includeDeleted = false, network = DEF
};
}

const query = `SELECT settings, deleted, flagged, verified, turbo, hibernated FROM spaces WHERE id = ? AND deleted in (?) LIMIT 1`;
const query = `SELECT settings, domain, deleted, flagged, verified, turbo, hibernated FROM spaces WHERE id = ? AND deleted in (?) LIMIT 1`;
const spaces = await db.queryAsync(query, [id.toLowerCase(), includeDeleted ? [0, 1] : [0]]);

if (!spaces[0]) return false;

return {
...jsonParse(spaces[0].settings, {}),
domain: spaces[0].domain,
deleted: spaces[0].deleted === 1,
verified: spaces[0].verified === 1,
flagged: spaces[0].flagged === 1,
Expand Down

0 comments on commit b3a797d

Please sign in to comment.