Migrated template endpoints to nexus service#64
Merged
jeroenrinzema merged 2 commits intomainfrom Dec 1, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates template API endpoints from a flat /projects/{projectID}/templates/{templateID} structure to a nested /projects/{projectID}/campaigns/{campaignID}/templates/{templateID} structure under the nexus service, establishing templates as campaign-scoped resources.
Key Changes:
- Added campaign-scoped template endpoints (create, update, delete) to the nexus service API
- Updated GetTemplate endpoint to include campaignID parameter
- Migrated frontend API calls to use the new campaign-scoped template endpoints
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| services/nexus/oapi/resources_gen.go | Generated client/server code for new campaign-scoped template endpoints |
| services/nexus/oapi/resources.yml | OpenAPI specification defining new template endpoints under campaigns |
| services/nexus/internal/store/templates.go | Added UpdateTemplate and DeleteTemplate store methods |
| services/nexus/internal/http/controllers/v1/templates.go | Implemented CreateTemplate, UpdateTemplate, and DeleteTemplate handlers |
| services/nexus/internal/http/controllers/v1/templates_test.go | Added tests for new template CRUD operations |
| services/console/src/views/router.tsx | Updated template route loader to use campaign-scoped API |
| services/console/src/views/campaign/template/mail/editor/Editor.tsx | Updated template save handler to use campaign-scoped update |
| services/console/src/views/campaign/template/Template.tsx | Updated template creation to use campaign-scoped API |
| services/console/src/views/campaign/template/Content.tsx | Updated template update to use campaign-scoped API |
| services/console/src/views/campaign/setup/Setup.tsx | Updated template creation in setup flow |
| services/console/src/types.ts | Removed campaign_id and type from template create/update params |
| services/console/src/api.ts | Moved template endpoints under campaigns.templates namespace |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
85ade0a to
729e550
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
729e550 to
4582460
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.
This PR migrates all used template endpoints to the
nexusservice.