@@ -56,8 +56,8 @@ type Metadata = {
5656 pluginNames : string [ ] ;
5757} ;
5858
59- function isTurbo ( turbo : boolean , turboExpiration : number ) : boolean {
60- return turbo || turboExpiration > Date . now ( ) / 1e3 ;
59+ function isTurbo ( turboExpiration : number ) : boolean {
60+ return turboExpiration > Date . now ( ) / 1e3 ;
6161}
6262
6363function getPopularity ( space : Metadata ) : number {
@@ -128,7 +128,7 @@ function mapSpaces(spaces: Record<string, any>) {
128128 name : space . name ,
129129 verified : space . verified ,
130130 flagged : space . flagged ,
131- turbo : isTurbo ( space . turbo , space . turboExpiration ) ,
131+ turbo : isTurbo ( space . turboExpiration ) ,
132132 turboExpiration : space . turboExpiration ,
133133 hibernated : space . hibernated ,
134134 parent : space . parent ,
@@ -160,7 +160,7 @@ async function loadSpaces() {
160160 const startTime = + Date . now ( ) ;
161161
162162 const query = `
163- SELECT id, settings, flagged, verified, turbo, turbo_expiration, hibernated, follower_count, proposal_count, vote_count
163+ SELECT id, settings, flagged, verified, turbo_expiration, hibernated, follower_count, proposal_count, vote_count
164164 FROM spaces
165165 WHERE deleted = 0
166166 ORDER BY id ASC
@@ -174,7 +174,7 @@ async function loadSpaces() {
174174 ...JSON . parse ( space . settings ) ,
175175 flagged : space . flagged === 1 ,
176176 verified : space . verified === 1 ,
177- turbo : isTurbo ( ! ! space . turbo , space . turbo_expiration ) ,
177+ turbo : isTurbo ( space . turbo_expiration ) ,
178178 turboExpiration : space . turbo_expiration ,
179179 hibernated : space . hibernated === 1 ,
180180 follower_count : space . follower_count ,
@@ -307,7 +307,7 @@ async function loadSpacesMetrics() {
307307
308308export async function getSpace ( id : string ) {
309309 const query = `
310- SELECT settings, domain, flagged, verified, turbo, turbo_expiration, hibernated, deleted, follower_count, proposal_count, vote_count
310+ SELECT settings, domain, flagged, verified, turbo_expiration, hibernated, deleted, follower_count, proposal_count, vote_count
311311 FROM spaces
312312 WHERE id = ?
313313 LIMIT 1` ;
@@ -321,7 +321,7 @@ export async function getSpace(id: string) {
321321 domain : space . domain ,
322322 flagged : space . flagged === 1 ,
323323 verified : space . verified === 1 ,
324- turbo : isTurbo ( ! ! space . turbo , space . turbo_expiration ) ,
324+ turbo : isTurbo ( space . turbo_expiration ) ,
325325 turboExpiration : space . turbo_expiration ,
326326 hibernated : space . hibernated === 1 ,
327327 deleted : space . deleted === 1
0 commit comments