Initial Phoenix Sankofa Cloud setup
- Complete project structure with Next.js frontend - GraphQL API backend with Apollo Server - Portal application with NextAuth - Crossplane Proxmox provider - GitOps configurations - CI/CD pipelines - Testing infrastructure (Vitest, Jest, Go tests) - Error handling and monitoring - Security hardening - UI component library - Documentation
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { FastifyRequest } from 'fastify'
|
||||
import { Context } from './types/context'
|
||||
import { getDb } from './db'
|
||||
|
||||
export async function createContext(request: FastifyRequest): Promise<Context> {
|
||||
return {
|
||||
request,
|
||||
user: (request as any).user, // Set by auth middleware
|
||||
db: getDb(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user