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: Create Squeeze Endpoint #282

Open
Iretoms opened this issue Aug 6, 2024 · 2 comments
Open

Feat: Create Squeeze Endpoint #282

Iretoms opened this issue Aug 6, 2024 · 2 comments

Comments

@Iretoms
Copy link
Contributor

Iretoms commented Aug 6, 2024

Description

This PR adds a new endpoint for creating squeeze in the application. The new feature includes the implementation of the SqueezeController, SqueezeService, and necessary DTOs, entities, and a unit test.

How should this be manually tested?

  1. Open Postman.
  2. Set the request to POST.
  3. Enter the URL for your API endpoint, e.g., http://localhost:3008/api/v1/squeeze.
  4. Go to the Body tab and select raw. Then set the format to JSON and enter the JSON body with the required fields.

Example:

{
 "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "phone": "08098761234",
  "location": "Lagos, Nigeria",
  "job_title": "Software Engineer",
  "company": "X-Corp",
  "interests": ["Web Development", "Cloud Computing"],
  "referral_source": "LinkedIn"
}
  1. Click Send. You'll get a response depending on the request body.

Success Response:

{
  "status": "success",
  "message": "Your request has been received. You will get a template shortly.",
  "data": {
     "id": "uuid",
     "email": "[email protected]",
    "first_name": "John",
    "last_name": "Doe",
    "phone": "08098761234",
    "location": "Lagos, Nigeria",
    "job_title": "Software Engineer",
    "company": "X-Corp",
    "interests": ["Web Development", "Cloud Computing"],
    "referral_source": "LinkedIn"
    "created_at": "12-03-2024",
    "updated_at": "12-03-2024"
  }
}

Failure Response:

{
  "status": "error",
  "message": "Failed to submit your request",
  "status_code": 400
}

Tasks

Task:

  • Implemented SqueezeController with a POST /api/v1/squeeze endpoint to handle squeeze creation.
  • Developed SqueezeService with a create method for squeeze creation logic.
  • Created SqueezeRequestDto for request validation.
  • Added error handling and responses for bad requests.
  • Unit tests for SqueezeService.
@samuelIkoli
Copy link

I believe this also can be closed right? @zxenonx @NwokoyeChigozie

@zxenonx
Copy link
Contributor

zxenonx commented Feb 26, 2025

I believe this also can be closed right? @zxenonx @NwokoyeChigozie

You can also check in the API docs.
If the endpoint is there already, you can then close the issue.

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

No branches or pull requests

3 participants