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

Feat: added get deleted newsletter emails #293

Merged

Conversation

Ajinx1
Copy link
Contributor

@Ajinx1 Ajinx1 commented Aug 7, 2024

Description

This pull request introduces a new API endpoint to retrieve soft-deleted newsletters.

Key Features

  • Endpoint: GET /api/v1/newsletter-subscription/deleted
  • Functionality: Retrieves newsletters that have been soft-deleted.
  • Authentication: Requires a valid JWT token for access.
  • Authorization: Only users with the SuperAdmin role can access this endpoint.

API DOC HERE

Acceptance Criteria

  • The endpoint should accept HTTP GET requests.
  • The request must include a valid authentication token in the Authorization header.
  • The response should return a list of newsletters that have been marked as soft-deleted.

Authorization Header:

{
    "Authorization": "Bearer <token>"
}

Related Issue

This pull request addresses Issue 288.

How Has This Been Tested?

The changes have been tested with the following methods:

  • Integration Tests:
    • Verified successful retrieval of soft-deleted newsletters by an authorized SuperAdmin user.
    • Tested unauthorized access attempts with an invalid token.
    • Handled cases where a regular user attempts to access the endpoint without sufficient permissions.

Screenshots (if appropriate - Postman, etc.)

image image image

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@Micah-Shallom Micah-Shallom self-requested a review August 7, 2024 20:47
Micah-Shallom
Micah-Shallom previously approved these changes Aug 7, 2024
Copy link
Contributor

@Micah-Shallom Micah-Shallom left a comment

Choose a reason for hiding this comment

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

satisfactory implementation

@Ajinx1 Ajinx1 dismissed Micah-Shallom’s stale review August 7, 2024 20:50

The merge-base changed after approval.

@Micah-Shallom Micah-Shallom self-requested a review August 7, 2024 20:52
Micah-Shallom
Micah-Shallom previously approved these changes Aug 7, 2024
Copy link
Contributor

@Micah-Shallom Micah-Shallom left a comment

Choose a reason for hiding this comment

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

satisfactory implementation

@Ajinx1 Ajinx1 dismissed Micah-Shallom’s stale review August 7, 2024 20:56

The merge-base changed after approval.

Micah-Shallom
Micah-Shallom previously approved these changes Aug 7, 2024
Copy link
Contributor

@Micah-Shallom Micah-Shallom left a comment

Choose a reason for hiding this comment

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

lgtm

@Ajinx1 Ajinx1 dismissed Micah-Shallom’s stale review August 7, 2024 21:12

The merge-base changed after approval.

@Cyberguru1 Cyberguru1 self-requested a review August 7, 2024 21:44
@Micah-Shallom Micah-Shallom self-requested a review August 7, 2024 22:07
Micah-Shallom
Micah-Shallom previously approved these changes Aug 7, 2024
Copy link
Contributor

@Micah-Shallom Micah-Shallom left a comment

Choose a reason for hiding this comment

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

lgtm

@Ajinx1 Ajinx1 dismissed Micah-Shallom’s stale review August 7, 2024 22:08

The merge-base changed after approval.

Cyberguru1
Cyberguru1 previously approved these changes Aug 7, 2024
@Ajinx1 Ajinx1 dismissed Cyberguru1’s stale review August 7, 2024 22:40

The merge-base changed after approval.

@Cyberguru1 Cyberguru1 self-requested a review August 7, 2024 22:43
Copy link
Contributor

@Cyberguru1 Cyberguru1 left a comment

Choose a reason for hiding this comment

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

please remove comments

@Ajinx1
Copy link
Contributor Author

Ajinx1 commented Aug 7, 2024

please remove comments

done

@Cyberguru1 Cyberguru1 self-requested a review August 7, 2024 23:24
@Cyberguru1 Cyberguru1 merged commit 5957713 into hngprojects:dev Aug 7, 2024
4 checks passed
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.

3 participants