Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(email): update email template routes and file paths #1334

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

Jayflashy
Copy link

Pull Request for Email Template Endpoint Refactor

Description

This PR refactors the email template endpoints to improve maintainability and better align with RESTful conventions. Changes include:

  • Modified the email controller routes to follow RESTful conventions.
  • Changed the template storage path from 'templates' to 'hng-templates' in update and delete because templatespath doesn't exist.
  • Updated HTTP methods and route parameters for template operations to align with common practices.
  • Adjusted service methods to use new file paths and proper HTTP status codes

Related Issue

Fixes #1278

Type of Change

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation updates
  • style: Code style/formatting changes
  • refactor: Code refactoring
  • perf: Performance improvements
  • test: Test additions/updates
  • chore: Build process or tooling changes
  • ci: CI configuration changes
  • other:

How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Manual tests

The changes were verified by running existing unit tests to ensure the refactor did not break any functionality and that the new paths and methods are functioning as expected.

Test Evidence

image

Screenshots (if applicable)

All Templates

image

Create

image

Update Template

image

Delete Template

image

Documentation Screenshots (if applicable)

Before

image

After

image

Checklist

  • My code follows the project's coding style
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have included a screenshot showing all tests passing
  • I have included documentation screenshots (if applicable)

Additional Notes

  • The routes and methods now adhere to RESTful conventions, improving the clarity of API design.
  • Ensure that the changes related to the template storage path (hng-templates) are reflected across all affected services and files.
  • The template storage path is now hng-templates in update and delete because templates path doesn't exist.

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.

FIX: Email Template Endpoints to Follow RESTful and Correct HTTP Methods
1 participant