From da83fd1ef2586b0f0418eec416afb95e45bb80af Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 9 Aug 2022 13:00:14 -0700 Subject: [PATCH] fix: :fire: Remove meta implementation in routing for now --- packages/backend/src/server/api/endpoints/admin/meta.ts | 1 + .../backend/src/server/api/endpoints/admin/update-meta.ts | 5 +++++ packages/client/src/router.ts | 6 ++---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts index 71a217d935..afe5889145 100644 --- a/packages/backend/src/server/api/endpoints/admin/meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/meta.ts @@ -398,6 +398,7 @@ export default define(meta, paramDef, async (ps, me) => { disableLocalTimeline: instance.disableLocalTimeline, disableRecommendedTimeline: instance.disableRecommendedTimeline, disableGlobalTimeline: instance.disableGlobalTimeline, + enableGuestTimeline: instance.enableGuestTimeline, driveCapacityPerLocalUserMb: instance.localDriveCapacityMb, driveCapacityPerRemoteUserMb: instance.remoteDriveCapacityMb, emailRequiredForSignup: instance.emailRequiredForSignup, diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index 0220c4a7ca..26745339b9 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -18,6 +18,7 @@ export const paramDef = { disableLocalTimeline: { type: 'boolean', nullable: true }, disableRecommendedTimeline: { type: 'boolean', nullable: true }, disableGlobalTimeline: { type: 'boolean', nullable: true }, + enableGuestTimeline: { type: 'boolean', nullable: true }, useStarForReactionFallback: { type: 'boolean', nullable: true }, recommendedInstances: { type: 'array', nullable: true, items: { type: 'string', @@ -141,6 +142,10 @@ export default define(meta, paramDef, async (ps, me) => { set.disableGlobalTimeline = ps.disableGlobalTimeline; } + if (typeof ps.enableGuestTimeline === 'boolean') { + set.enableGuestTimeline = ps.enableGuestTimeline; + } + if (typeof ps.useStarForReactionFallback === 'boolean') { set.useStarForReactionFallback = ps.useStarForReactionFallback; } diff --git a/packages/client/src/router.ts b/packages/client/src/router.ts index 8edfa03f3b..89f89461c9 100644 --- a/packages/client/src/router.ts +++ b/packages/client/src/router.ts @@ -4,10 +4,8 @@ import { $i, iAmModerator } from '@/account'; import MkLoading from '@/pages/_loading_.vue'; import MkError from '@/pages/_error_.vue'; import { ui } from '@/config'; -import * as os from '@/os'; -const meta = os.api('admin/meta'); -const guestTimeline = meta.enableGuestTimeline; +// const guestTimeline = nodeinfo.meta.enableGuestTimeline; const page = (loader: AsyncComponentLoader) => defineAsyncComponent({ loader: loader, @@ -460,7 +458,7 @@ export const routes = [{ }, { path: '/timeline', component: page(() => import('./pages/timeline.vue')), - loginRequired: guestTimeline, + // loginRequired: guestTimeline, }, { name: 'index', path: '/',