Skip to content

features/API-62/update-coordinates-with-socket#110

Merged
andres15alvarez merged 2 commits intodevfrom
features/API-62/update-coordinates-with-socket
May 19, 2025
Merged

features/API-62/update-coordinates-with-socket#110
andres15alvarez merged 2 commits intodevfrom
features/API-62/update-coordinates-with-socket

Conversation

@andres15alvarez
Copy link
Member

This pull request introduces functionality for updating delivery coordinates via WebSocket communication. Key changes include the addition of a new DTO, enhancements to the WebSocket gateway, and updates to imports to support the new feature.

Additions to support delivery coordinates:

  • New DTO for delivery coordinates: Added UpdateCoordinatesWsDTO in src/order/dto/order-delivery.dto.ts to handle latitude, longitude, and order ID validation. This includes new decorators like @IsLatitude and @IsLongitude for validation.

  • WebSocket gateway update: Added a new updateCoordinates method in src/order/order.gateway.ts to handle the updateCoordinates WebSocket event. This method validates incoming data, checks the order's user, and emits updated coordinates to the appropriate WebSocket client.

Supporting changes:

  • Updated imports: Adjusted imports in src/order/dto/order-delivery.dto.ts and src/order/order.gateway.ts to include the new UpdateCoordinatesWsDTO and additional class-validator decorators. [1] [2]

@andres15alvarez andres15alvarez self-assigned this May 19, 2025
@andres15alvarez andres15alvarez added the feature New feature or request label May 19, 2025
@andres15alvarez andres15alvarez merged commit 3ba90ca into dev May 19, 2025
2 checks passed
@andres15alvarez andres15alvarez deleted the features/API-62/update-coordinates-with-socket branch May 19, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant