sef-global / scholarx-backend

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

Implement Create email template endpoint (Admin) #40 #75

Closed sathudeva7 closed 10 months ago

sathudeva7 commented 10 months ago

Purpose

The purpose of this PR is to fix #40

Goals

This issue involves implementing an API to create email template. The endpoint should allow Admin to make a POST request to {{baseUrl}}/api/admin/emails/templates.

Approach

 const emailRepositroy = dataSource.getRepository(Email)

    const newEmailTemplate = new Email(recipient, subject, content, state)

    const savedEmailTemplate = await emailRepositroy.save(newEmailTemplate)

Screenshots

Checklist

Related PRs

## Test environment ## Learning