18 lines
904 B
TypeScript
18 lines
904 B
TypeScript
/**
|
|
* User controller — HTTP handlers for the authenticated user's profile (read and update).
|
|
*/
|
|
import { Response } from 'express';
|
|
import { AuthRequest } from '../middleware/auth';
|
|
/**
|
|
* Returns the authenticated user's profile.
|
|
* @param req - Authenticated request; user ID is taken from the JWT.
|
|
* @param res - JSON profile object on success, 400 on failure.
|
|
*/
|
|
export declare function getMe(req: AuthRequest, res: Response): Promise<void>;
|
|
/**
|
|
* Updates the authenticated user's profile fields (name, date of birth, email, phone).
|
|
* @param req - Authenticated request. Body: optional `firstName`, `middleName`, `lastName`, `dateOfBirth`, `email`, `phone`.
|
|
* @param res - JSON `{ message: 'Profile updated' }` on success, 400 on validation or update failure.
|
|
*/
|
|
export declare function updateMe(req: AuthRequest, res: Response): Promise<void>;
|
|
//# sourceMappingURL=userController.d.ts.map
|