P1: drivers + trips(★state machine) + matching(Redis GEO) + tariff engine + maps + realtime + seed
- drivers: apply/approve/status/location (+Redis GEO presence) - trips: request→accept→status transitions + trip_events audit + offers via socket - matching: Redis GEO nearby drivers - tariff: JSON-rule engine (time_or_distance/window/rounding) + quote endpoint - maps: straight-line routing seam (انطلق later) - realtime: Socket.IO gateway (JWT auth, tenant rooms) - seed: demo tenant siro + default tariff on boot - migration InitP1 (drivers/tariffs/trips/trip_events) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,16 @@ export class UsersService {
|
||||
id: string,
|
||||
data: Partial<Pick<User, 'name'>>,
|
||||
): Promise<User | null> {
|
||||
await this.userRepository.update({ tenant_id: tenantId, id }, { name: data.name });
|
||||
if (data.name !== undefined) {
|
||||
await this.userRepository.update({ tenant_id: tenantId, id }, { name: data.name });
|
||||
}
|
||||
return this.findById(tenantId, id);
|
||||
}
|
||||
|
||||
async setRole(tenantId: string, id: string, role: string): Promise<void> {
|
||||
await this.userRepository.update(
|
||||
{ tenant_id: tenantId, id },
|
||||
{ role: role as UserRole },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user