feat: complete admin backend controllers and services
- AdminPlansController & Service (CRUD, reorder) - AdminPaymentMethodsController & Service (CRUD, reorder) - AdminPaymentsController & Service (verify, reject, pending count) - AdminUsersController & Service (search, suspend, grant pro access, stats) - AdminConfigController & Service (dynamic config management) - Wire all controllers into AdminModule - Import AdminModule in AppModule Admin API Routes: - GET/POST/PUT/DELETE /admin/plans - GET/POST/PUT/DELETE /admin/payment-methods - GET /admin/payments (with status filter) - POST /admin/payments/:id/verify - POST /admin/payments/:id/reject - GET /admin/users (with search) - POST /admin/users/:id/grant-pro - GET/POST/DELETE /admin/config All routes protected by AuthGuard + AdminGuard
This commit is contained in:
60
apps/api/dist/admin/admin-config.controller.d.ts
vendored
Normal file
60
apps/api/dist/admin/admin-config.controller.d.ts
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
import { AdminConfigService } from './admin-config.service';
|
||||
interface RequestWithUser {
|
||||
user: {
|
||||
userId: string;
|
||||
};
|
||||
}
|
||||
export declare class AdminConfigController {
|
||||
private readonly service;
|
||||
constructor(service: AdminConfigService);
|
||||
findAll(category?: string): Promise<{
|
||||
id: string;
|
||||
key: string;
|
||||
value: string;
|
||||
category: string;
|
||||
label: string;
|
||||
description: string | null;
|
||||
type: string;
|
||||
isSecret: boolean;
|
||||
updatedAt: Date;
|
||||
updatedBy: string | null;
|
||||
}[]>;
|
||||
getByCategory(): Promise<Record<string, any[]>>;
|
||||
findOne(key: string): Promise<{
|
||||
id: string;
|
||||
key: string;
|
||||
value: string;
|
||||
category: string;
|
||||
label: string;
|
||||
description: string | null;
|
||||
type: string;
|
||||
isSecret: boolean;
|
||||
updatedAt: Date;
|
||||
updatedBy: string | null;
|
||||
} | null>;
|
||||
upsert(key: string, data: any, req: RequestWithUser): Promise<{
|
||||
id: string;
|
||||
key: string;
|
||||
value: string;
|
||||
category: string;
|
||||
label: string;
|
||||
description: string | null;
|
||||
type: string;
|
||||
isSecret: boolean;
|
||||
updatedAt: Date;
|
||||
updatedBy: string | null;
|
||||
}>;
|
||||
delete(key: string): Promise<{
|
||||
id: string;
|
||||
key: string;
|
||||
value: string;
|
||||
category: string;
|
||||
label: string;
|
||||
description: string | null;
|
||||
type: string;
|
||||
isSecret: boolean;
|
||||
updatedAt: Date;
|
||||
updatedBy: string | null;
|
||||
}>;
|
||||
}
|
||||
export {};
|
||||
Reference in New Issue
Block a user