21 lines
486 B
TypeScript
21 lines
486 B
TypeScript
|
import { nanoid } from 'nanoid';
|
||
|
|
||
|
// Generate unique IDs
|
||
|
export const generateId = () => nanoid();
|
||
|
|
||
|
// Error handling
|
||
|
export class ApiError extends Error {
|
||
|
constructor(message: string, public status: number = 500) {
|
||
|
super(message);
|
||
|
this.name = 'ApiError';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Export all service modules
|
||
|
export * from './scripts';
|
||
|
export * from './users';
|
||
|
export * from './ratings';
|
||
|
export * from './analytics';
|
||
|
export * from './collections';
|
||
|
export * from './auth';
|