feat: implement rewards module with referral/coupon systems, update tariff seeding, and add trip distance service for improved billing accuracy.

This commit is contained in:
Hamza-Ayed
2026-07-19 00:20:37 +03:00
parent 22d18f32fe
commit 92f1eeb48c
39 changed files with 3612 additions and 208 deletions
+3 -1
View File
@@ -35,9 +35,11 @@ export class AuthController {
@Headers('x-device-id') deviceId: string,
@Body('phone') phone: string,
@Body('code') code: string,
// كود دعوة اختياري — يُسجَّل للمستخدم الجديد وحده (المجموعة L).
@Body('referral_code') referralCode?: string,
) {
if (!tenantId) throw new UnauthorizedException('Tenant ID (x-tenant-id) is required');
return this.authService.verifyOtp(tenantId, phone, code, deviceId);
return this.authService.verifyOtp(tenantId, phone, code, deviceId, referralCode);
}
@Post('refresh')