mirror of
https://github.com/marcogll/AnchorOS.git
synced 2026-03-15 17:24:30 +00:00
- Add JSDoc comments to API routes and business logic functions - Update README.md with Phase 2 status and deployment/production notes - Enhance TASKS.md with estimated timelines and dependencies - Create docs/STAFF_TRAINING.md for team onboarding - Create docs/CLIENT_ONBOARDING.md for customer experience - Create docs/OPERATIONAL_PROCEDURES.md for daily operations - Create docs/TROUBLESHOOTING.md for common setup issues - Fix TypeScript errors in hq/page.tsx
15 lines
394 B
TypeScript
15 lines
394 B
TypeScript
import { supabaseAdmin } from '@/lib/supabase/client'
|
|
|
|
/**
|
|
* generateShortId function that generates a unique short ID using Supabase RPC.
|
|
*/
|
|
export async function generateShortId(): Promise<string> {
|
|
const { data, error } = await supabaseAdmin.rpc('generate_short_id')
|
|
|
|
if (error) {
|
|
throw new Error(`Failed to generate short_id: ${error.message}`)
|
|
}
|
|
|
|
return data as string
|
|
}
|