Skip to content

Migrated template endpoints to nexus service#64

Merged
jeroenrinzema merged 2 commits intomainfrom
refactor/templates
Dec 1, 2025
Merged

Migrated template endpoints to nexus service#64
jeroenrinzema merged 2 commits intomainfrom
refactor/templates

Conversation

@jeroenrinzema
Copy link
Copy Markdown
Contributor

This PR migrates all used template endpoints to the nexus service.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread services/console/src/views/campaign/template/Content.tsx Outdated
Comment thread services/console/src/types.ts
jeroenrinzema and others added 2 commits December 1, 2025 10:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jeroenrinzema jeroenrinzema merged commit ee0a585 into main Dec 1, 2025
3 checks passed
@jeroenrinzema jeroenrinzema deleted the refactor/templates branch December 1, 2025 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants