fix prod default feeds not working

zio/stable
Ansh Nanda 2023-05-22 16:12:05 -07:00
parent 7cad7d12f1
commit 762bd15ed6
1 changed files with 8 additions and 8 deletions

View File

@ -102,13 +102,13 @@ export async function DEFAULT_FEEDS(
serviceUrl: string, serviceUrl: string,
resolveHandle: (name: string) => Promise<string>, resolveHandle: (name: string) => Promise<string>,
) { ) {
if (serviceUrl.includes('localhost')) { if (serviceUrl.includes('localhost')) { // local dev
const aliceDid = await resolveHandle('alice.test') const aliceDid = await resolveHandle('alice.test')
return { return {
pinned: [`at://${aliceDid}/app.bsky.feed.generator/alice-favs`], pinned: [`at://${aliceDid}/app.bsky.feed.generator/alice-favs`],
saved: [`at://${aliceDid}/app.bsky.feed.generator/alice-favs`], saved: [`at://${aliceDid}/app.bsky.feed.generator/alice-favs`],
} }
} else if (serviceUrl.includes('staging')) { } else if (serviceUrl.includes('staging')) { // staging
return { return {
pinned: [STAGING_DEFAULT_FEED('whats-hot')], pinned: [STAGING_DEFAULT_FEED('whats-hot')],
saved: [ saved: [
@ -118,14 +118,14 @@ export async function DEFAULT_FEEDS(
STAGING_DEFAULT_FEED('hot-classic'), STAGING_DEFAULT_FEED('hot-classic'),
], ],
} }
} else { } else { // production
return { return {
pinned: [STAGING_DEFAULT_FEED('whats-hot')], pinned: [PROD_DEFAULT_FEED('whats-hot')],
saved: [ saved: [
STAGING_DEFAULT_FEED('bsky-team'), PROD_DEFAULT_FEED('bsky-team'),
STAGING_DEFAULT_FEED('with-friends'), PROD_DEFAULT_FEED('with-friends'),
STAGING_DEFAULT_FEED('whats-hot'), PROD_DEFAULT_FEED('whats-hot'),
STAGING_DEFAULT_FEED('hot-classic'), PROD_DEFAULT_FEED('hot-classic'),
], ],
} }
} }