ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/llms-txt-hub / apps/web/app/api/auth/metadata/route.ts

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/llms-txt-hub / apps/web/app/api/auth/metadata/route.ts
DateNot specified in source
RepositoryJanady13/llms-txt-hub
Revisione0f4bf978d4df168369c7601d9c5f5ea89e84377
Branchmain
Path or archive memberapps/web/app/api/auth/metadata/route.ts
Original SHA-256cda1f105165d3d3252b530d76ebd67444514e18866c046e47d6ceff231b03707
Git blob SHA96ead9790aef842ac6716658b57320ee3df939a8
Reading-copy SHA-256cda1f105165d3d3252b530d76ebd67444514e18866c046e47d6ceff231b03707

Original source ↗

Recovered source transcript

import { auth, clerkClient } from '@clerk/nextjs/server' import { logger } from '@thedaviddias/logging' import { type NextRequest, NextResponse } from 'next/server' /** * Handle POST request to sync user metadata from auth provider */ export async function POST(request: NextRequest) { try { const { userId } = await auth() if (!userId) { return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) } const body = await request.json() const { authLevel, canSubmitPR, githubConnected } = body // Update user's public metadata const client = await clerkClient() await client.users.updateUserMetadata(userId, { publicMetadata: { authLevel: authLevel ?? 'email_only', canSubmitPR: canSubmitPR ?? false, githubConnected: githubConnected ?? false, lastUpdated: new Date().toISOString() } }) return NextResponse.json({ success: true }) } catch (error) { logger.error(error instanceof Error ? error : new Error(String(error)), { data: error, tags: { type: 'api', route: 'auth/metadata' } }) return NextResponse.json({ error: 'Failed to update metadata' }, { status: 500 }) } }

Search equations, builds, manuscript text, and recovered sources.