hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
181 stars 105 forks source link

[FEAT]: Squeeze Page Implementation - BACKEND #69

Closed Solomonuche closed 1 month ago

Solomonuche commented 1 month ago

Description

Develop a backend endpoint to handle requests for users who want a copy of the boilerplate. The endpoint will accept an email address, validate, sanitize it, and handle both successful and failed validations appropriately. If the email passes validation, it will be stored in the database and a success response is sent to the client. If validation fails, an error message will be returned.

Acceptance Criteria

Purpose

To grant the user access to the boilerplate in exchange for their email

Requirements

Expected Outcome

Status code

Endpoint

[POST] /api/v1/pages/squeeze

Requests:

headers:

{
    "email": "string"
}

Responses:

Successful response

{
    "message": "string",
    "success": true,
    "status code": int
}

Error response

{
    "message": "string",
    "success": false,
    "status code": int
}

Database design

schema

Table name: squeeze_table

id:

email:

createdAt:

Testing

  1. Unit Tests

The systems should have unit tests covering:

markessien commented 1 month ago

Squeeze page is far more than this

Fifetoyi commented 1 month ago

Hi @Solomonuche can you confirm if you're still working on this? I have a duplicate ticket, though I have noticed you are now working on something else. Thanks

Solomonuche commented 1 month ago

I will reach out to the team in charge and revert back.

Fifetoyi commented 1 month ago

Thanks

phurhard commented 1 month ago

@Solomonuche you can close this issue if you're not working on it again, I'll do that now self @Fifetoyi already working on an approved version of it

phurhard commented 1 month ago

@phurhard Issue #80 was approved before this. As of now, this issue is yet to be approved.

Ehh, what are you saying exactly

coderoyalty commented 1 month ago

Sorry, I misunderstood. I thought I saw a pull request closing #80, but never mind. @phurhard

Solomonuche commented 1 month ago

I made this issue for my team mates since I was the team Lead and had access to the repo. I have reached out to the team but no feedback