[READ-ONLY] Mirror of https://github.com/flo-bit/skywatched. review movies and tv shows, based on at proto skywatched.app
0

Configure Feed

Select the types of activity you want to include in your feed.

fix 2

Florian (Dec 12, 2024, 3:16 AM +0100) ee95c5b9 5d55779c

+10 -4
+4 -4
src/lib/server/client.ts
··· 5 5 6 6 const publicUrl = 'https://nyx-kappa.vercel.app'; 7 7 const port = 5173; 8 - const url = dev ? `http://[::1]:${port}` : publicUrl; // since I'm using ipv6, use ::1 instead 127.0.0.1 8 + const url = dev ? `http://[::1]:${port}` : publicUrl; 9 9 const enc = encodeURIComponent; 10 10 11 - const clientId = !dev 12 - ? `${publicUrl}/client-metadata.json` 13 - : `http://localhost?redirect_uri=${enc(`${url}/oauth/callback`)}&scope=${enc('atproto transition:generic')}`; 11 + const encodeCallbackUrl = enc(`${url}/oauth/callback`); 12 + const devClientId = `http://localhost?redirect_uri=${encodeCallbackUrl}&scope=${enc('atproto transition:generic')}`; 13 + const clientId = !dev ? `${publicUrl}/client-metadata.json` : devClientId; 14 14 15 15 export const atclient = new NodeOAuthClient({ 16 16 stateStore: new StateStore(db),
+6
src/routes/client-metadata.json/+server.ts
··· 1 + import { atclient } from "$lib/server/client"; 2 + import { json } from "@sveltejs/kit"; 3 + 4 + export async function GET() { 5 + return json(atclient.clientMetadata); 6 + }