@@ -194,15 +194,15 @@ public String getSMSTemplates(SMSRequest smsRequest) throws Exception {
194194
195195 @ Override
196196 public String updateSMSTemplate (UpdateSMSRequest smsRequest ) throws Exception {
197- SMSTemplate smsTemplate = null ;
198- SMSTemplate request = smsMapper .updateRequestToSMSTemplate (smsRequest );
199- int updateCount = smsTemplateRepository .updateSMSTemplate (request .getSmsTemplateID (), request .getDeleted ());
200- if (updateCount > 0 ) {
201- smsTemplate = smsTemplateRepository .findBySmsTemplateID (request .getSmsTemplateID ());
202- } else {
203- throw new Exception ("Failed to update the result" );
204- }
205- return OutputMapper .gsonWithoutExposeRestriction ().toJson (smsMapper .smsTemplateToResponse (smsTemplate ));
197+ SMSTemplate smsTemplate = null ;
198+ SMSTemplate request = smsMapper .updateRequestToSMSTemplate (smsRequest );
199+ int updateCount = smsTemplateRepository .updateSMSTemplate (request .getSmsTemplateID (), request .getDeleted ());
200+ if (updateCount > 0 ) {
201+ smsTemplate = smsTemplateRepository .findBySmsTemplateID (request .getSmsTemplateID ());
202+ } else {
203+ throw new Exception ("Failed to update the result" );
204+ }
205+ return OutputMapper .gsonWithoutExposeRestriction ().toJson (smsMapper .smsTemplateToResponse (smsTemplate ));
206206 }
207207
208208 @ Override
@@ -347,18 +347,17 @@ public SMSNotification prepareVideoCallSMS(SMSRequest request, VideoCallParamete
347347 sms .setPhoneNo (request .getFacilityPhoneNo ());
348348 }
349349 }
350-
351350 sms .setSms (smsToSend );
352- return smsNotification .save (sms );
351+ return smsNotification .save (sms );
353352}
354353
355354
356355 public String getVideoCallData (String methodName , VideoCallParameters videoCall ) throws Exception {
357356 String variableValue = "" ;
358357 switch (methodName .toLowerCase ()) {
359358 case "videoconsultationlink" :
360- variableValue = videoCall .getMeetingLink () != null ? videoCall .getMeetingLink () : "" ;
361- break ;
359+ variableValue = videoCall .getMeetingLink () != null ? videoCall .getMeetingLink () : "" ;
360+ break ;
362361 case "consultationdate" :
363362 if (videoCall .getDateOfCall () != null ) {
364363 SimpleDateFormat inputFormat = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss" );
@@ -377,7 +376,6 @@ public String getVideoCallData(String methodName, VideoCallParameters videoCall)
377376 variableValue = result != null ? result .toString () : "" ;
378377 break ;
379378 }
380-
381379 return variableValue .trim ();
382380 }
383381
0 commit comments