sef-global / scholarx-backend

This is the backend of the ScholarX
MIT License
10 stars 37 forks source link

Implement Add platform details endpoint (Admin) #37 #74

Closed sathudeva7 closed 10 months ago

sathudeva7 commented 10 months ago

Purpose

The purpose of this PR is to fix #37

Goals

This issue involves implementing an API to Add platform details. The endpoint should allow Admin to make a POST request to {{baseUrl}}/api/admin/platform.

Approach

    const platformRepository = dataSource.getRepository(Platform)

    const newPlatform = new Platform(
      description,
      mentor_questions,
      image_url,
      landing_page_url,
      email_templates,
      title
    )

    const savedPlatform = await platformRepository.save(newPlatform)

Screenshots

Checklist

Related PRs

## Test environment ## Learning
sathudeva7 commented 10 months ago

"Implement Get platform details endpoint (Admin) #35" task also pushed