Commit 48a63035 authored by Ghitha Dinan's avatar Ghitha Dinan

typo

parent 721155b8
...@@ -22,6 +22,6 @@ class EmailController { ...@@ -22,6 +22,6 @@ class EmailController {
@PostMapping(value = ["send"], produces = ["application/json"]) @PostMapping(value = ["send"], produces = ["application/json"])
fun sendEmail(@Valid @RequestBody request: EmailRequest): ResponseEntity<ReturnData> { fun sendEmail(@Valid @RequestBody request: EmailRequest): ResponseEntity<ReturnData> {
return service.sendEamil(request) return service.sendEmail(request)
} }
} }
...@@ -22,10 +22,10 @@ class EmailService { ...@@ -22,10 +22,10 @@ class EmailService {
@Value("\${spring.mail.from}") @Value("\${spring.mail.from}")
private lateinit var emailFrom: String private lateinit var emailFrom: String
fun sendEamil(request: EmailRequest): ResponseEntity<ReturnData> { fun sendEmail(request: EmailRequest): ResponseEntity<ReturnData> {
return try { return try {
Thread { Thread {
sendEmail(request.to, request.subject, request.message) sendEmailProcess(request.to, request.subject, request.message)
}.start() }.start()
responseSuccess() responseSuccess()
} catch (e: Exception) { } catch (e: Exception) {
...@@ -33,7 +33,7 @@ class EmailService { ...@@ -33,7 +33,7 @@ class EmailService {
} }
} }
private fun sendEmail(to: String?, subject: String?, message: String?) { private fun sendEmailProcess(to: String?, subject: String?, message: String?) {
try { try {
val msg = SimpleMailMessage() val msg = SimpleMailMessage()
msg.setTo(to) msg.setTo(to)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment