ATlast — you'll never need to find your favorites on another platform again. Find your favs in the ATmosphere.
atproto
1import { SimpleHandler } from "./core/types/api.types"; 2import { DatabaseService } from "./infrastructure/database/DatabaseService"; 3import { withErrorHandling } from "./core/middleware"; 4import { successResponse } from "./utils"; 5 6const initDbHandler: SimpleHandler = async () => { 7 const dbService = new DatabaseService(); 8 await dbService.initDatabase(); 9 return successResponse({ message: "Database initialized successfully" }); 10}; 11 12export const handler = withErrorHandling(initDbHandler);