Project

General

Profile

dev #2021

Updated by Ayat Rahman about 1 year ago

Create a Postman collection #### **Description:** 

 Modify the schema to add fields for core endpoints (GET /ai-tool, POST /ai-tool/step-one, social links such as Facebook, LinkedIn, YouTube, Discord, and others, and implement the PATCH /ai-tool/step-two/:id, route for updating these fields. 

 #### **Tasks:** 

 1.    **Modify Database Schema:** 
    
     -     Add fields to the `ai_tools` table for Facebook, LinkedIn, YouTube, Discord, etc., ensuring all fields are optional. 
 2.    **Implement PATCH /ai-tool/step-three/:id). Include test scripts Route:** 
    
     -     Define the `/api/tools/:id` route to handle the update of social links for status codes a specific tool. 
 3.    **Validate Fields:** 
    
     -     Use Zod to validate the new fields and response validation. ensure all fields are optional. 
 4.    **Update Social Links in Database:** 
    
     -     Update the social links in the database for the tool using the PATCH route. 
 5.    **Implement GET Route for Final Check:** 
    
     -     Ensure the GET route (`/api/tools/:id`) returns the updated social links along with other tool details. 

 #### **Acceptance Criteria:** 

 -     The schema for social links is updated correctly in the database. 
 -     The PATCH route is functional and updates the social links as per the request. 
 -     The GET route returns the updated social links and tool details correctly. 

Back