Project-Stage-Academy / UA1244_beta

1 stars 0 forks source link

API Endpoint to Save/Follow a Startup [24-2] #40

Open mehalyna opened 3 weeks ago

mehalyna commented 3 weeks ago

Description: Develop an API endpoint that allows investors to save or follow startups. This endpoint should handle POST requests where the investor can pass the startup’s ID to save.

Technical Steps:

  1. Create a new endpoint in your Django views (e.g., POST /api/startups/{startup_id}/save).
  2. In the view, check if the startup exists and if the investor has already saved it.
  3. If not already saved, create a new InvestorStartup instance.
  4. Return a success response indicating the startup has been successfully saved.

    Task #38