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

Introduce DeleteFeatureResponse and update deleteFeature method with a status code and a message #150

Merged
merged 2 commits into from
May 10, 2024

Conversation

timDeHof
Copy link
Contributor

@timDeHof timDeHof commented May 9, 2024

Description

This pull request introduces a new DeleteFeatureResponse class to handle the response for feature deletion scenarios. The class includes a message and statusCode property, which will provide a consistent and clear response when deleting a feature.
The deleteFeature method in the FeaturesService has also been updated to return an instance of the newly added DeleteFeatureResponse class. When a feature is successfully deleted, the method will return a response object with a success message and a status code of 200.

Issue link

Fixes # https://app.clickup.com/t/86b07bdar

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature updates / changes
  • Tests
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Since the features don't have any tests for them yet. you have to test this endpoint in swagger by login as the default user and type 7 for the featureId, which should give a 200 response status and message.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • 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 tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have updated the change log

…r feature deletion

fix(features): update deleteFeature method in FeaturesService to return a proper response object
The DeleteFeatureResponse class is added to handle the response for feature deletion. It includes a message and statusCode property. The deleteFeature method in FeaturesService is updated to return a response object with a success message and status code of 200 when a feature is successfully deleted. This improves the consistency and clarity of the code when handling feature deletion.
@timDeHof timDeHof self-assigned this May 9, 2024
The changelog has been updated to include the following changes:
- A new feature has been added to the deleteFeature method. It now uses a DeleteFeatureResponse and returns an object with a successful status and a message. This change was made in pull request #150.
- Various updates and additions have been made to the test github actions workflow, form title references, and form input types. These changes were made in pull requests #143, #145, and #146 respectively.
Copy link
Contributor

@cherylli cherylli left a comment

Choose a reason for hiding this comment

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

All tests passed and works as expected 👍

Copy link
Contributor

@Ajen07 Ajen07 left a comment

Choose a reason for hiding this comment

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

The changes gives the desired response and all the existing unit and e2e tests are passed.

@timDeHof timDeHof merged commit 7bdaacc into dev May 10, 2024
1 check passed
@timDeHof timDeHof deleted the refactor/add_response_code_to_feature_delete branch May 10, 2024 14:01
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