Migrate journeys CRUD endpoints to nexus service#81
Merged
jeroenrinzema merged 5 commits intomainfrom Dec 1, 2025
Merged
Conversation
Copilot
AI
changed the title
[WIP] Migrate journeys endpoints to nexus service
Migrate journeys CRUD endpoints to nexus service
Nov 30, 2025
There was a problem hiding this comment.
Pull request overview
This PR migrates the basic CRUD operations for journeys from the legacy Node.js platform service to the Go nexus service, implementing 5 core endpoints for journey management.
Key Changes:
- Added complete CRUD API endpoints for journey management (list, create, get, update, delete)
- Implemented database store layer with pagination support and soft delete functionality
- Created comprehensive test suite using testcontainers for integration testing
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
services/nexus/oapi/resources.yml |
Defines 5 new journey endpoints with OpenAPI schemas for request/response bodies |
services/nexus/oapi/resources_gen.go |
Generated types and client code from OpenAPI specification |
services/nexus/internal/store/journeys.go |
Implements store methods for CRUD operations with pagination and soft deletes |
services/nexus/internal/http/controllers/v1/journeys.go |
HTTP handlers for journey endpoints with validation and error handling |
services/nexus/internal/http/controllers/v1/journeys_test.go |
Integration tests covering all CRUD operations and edge cases |
services/nexus/internal/http/controllers/v1/controller.go |
Registers journeys controller with main controller |
jeroenrinzema
requested changes
Nov 30, 2025
jeroenrinzema
requested changes
Nov 30, 2025
jeroenrinzema
requested changes
Nov 30, 2025
5496abd to
3dfdc74
Compare
- Define Journey CRUD endpoints in OpenAPI spec - Add CreateJourney and UpdateJourney schemas - Implement ListJourneys, CreateJourney, GetJourney, UpdateJourney, DeleteJourney store methods - Create JourneysController with full CRUD operations - Add comprehensive unit tests using testcontainers - Wire JourneysController into main Controller struct Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
- Add JourneyUpdate struct with pointer fields for partial updates - Update UpdateJourney store method to use COALESCE pattern - Simplify controller to pass update struct directly to store - Follows existing patterns from campaigns, projects, and admins Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
- Fix unused variable 'journey' at line 156 by using '_' for existence check - Create named type 'journeyWithCount' instead of anonymous struct - Improves code clarity and follows Go best practices Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
- Change journeyWithCount to embed Journey type instead of duplicating fields - Simplify assignment by using r.Journey instead of manual field copying - Follows the same pattern as campaigns and users stores Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
2162024 to
4e4fed8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make generateSummary
Successfully migrated basic journey CRUD endpoints from the legacy TypeScript platform service to the new Go nexus service with all review feedback addressed.
Latest Changes
r.Journeyinstead of manually copying all fieldsOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.