You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No profile management endpoints exist beyond the implicit user creation during OTP signup. Users need to be able to retrieve and update their own profile data, and the system needs a KYC status field to support future regulatory compliance.
Acceptance Criteria
GET /api/profile (authenticated) returns the authenticated user's profile: masked phone, registration date, role, trade count, KYC status, virtual account number, and Stellar public key.
PATCH /api/profile (authenticated) accepts optional fields: alias (string, max 30 chars, alphanumeric), notificationsEnabled (boolean). Validates and updates the user record.
GET /api/profile/trades (authenticated) returns the user's own trade history with pagination (?page, ?limit, ?status filter).
A kyc_status enum column (unverified, pending, verified) is added to the users table via migration.
PATCH /api/admin/users/:id/kyc (admin only) updates a user's KYC status.
All profile endpoints apply the authenticate middleware; the KYC update endpoint also applies authorize("admin").
Location:
server/src/routes/profile.tsDescription
No profile management endpoints exist beyond the implicit user creation during OTP signup. Users need to be able to retrieve and update their own profile data, and the system needs a KYC status field to support future regulatory compliance.
Acceptance Criteria
GET /api/profile(authenticated) returns the authenticated user's profile: masked phone, registration date, role, trade count, KYC status, virtual account number, and Stellar public key.PATCH /api/profile(authenticated) accepts optional fields:alias(string, max 30 chars, alphanumeric),notificationsEnabled(boolean). Validates and updates the user record.GET /api/profile/trades(authenticated) returns the user's own trade history with pagination (?page,?limit,?statusfilter).kyc_statusenum column (unverified,pending,verified) is added to theuserstable via migration.PATCH /api/admin/users/:id/kyc(admin only) updates a user's KYC status.authenticatemiddleware; the KYC update endpoint also appliesauthorize("admin").