hngprojects / hng_boilerplate_golang_web

Apache License 2.0
77 stars 50 forks source link

Feat: implement squeeze record create endpoint and tests #283

Closed Iretoms closed 3 months ago

Iretoms commented 3 months ago

Description

I worked on creating an endpoint for the squeeze record. Upon creation, an email is sent to the email provided in the record. I ensured appropriate error handling across board which included checking if all the required fields were filled, checking for invalid and duplicate emails and also duplicate phones. I tested using postman. I also fixed some organization routes name by changing the "s" to "z".

API DOCS LINEAR TICKET

Related Issue (Link to Github issue)

#282

How Has This Been Tested?

This was tested using the inbuilt Go testing library. End-to-end tests were run, which all passed, accounting for a successful creation of squeeze record, invalid and duplicate emails and also duplicate phone numbers. ​

Screenshots (if appropriate - Postman, etc):

Screenshot (68) Screenshot (67)

Types of changes