Skip to content

Commit

Permalink
feat: provide predefined templates for Renault Digital and Datadog on…
Browse files Browse the repository at this point in the history
…site events

Signed-off-by: sutan <[email protected]>
  • Loading branch information
sunix committed Mar 11, 2022
1 parent df52036 commit 1e63a65
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class CreateMailCampaignCommand implements Runnable {
@Parameters(index = "0", description = "Url of the event page where to get the event details. Like https://www.parisjug.org/xwiki/wiki/oldversion/view/Meeting/20201208")
private String url;

@Option(names = { "-t", "--template" }, description = "Set the template id to be used (default is 51)")
@Option(names = { "-t", "--template" }, description = "Set the template id to be used. \nDefault is 51 for online events.\nUse `rd` or `datadog` to use the predefined onsite event at Renault Digital or Datadog.\nOtherwise, create an new template in SendItBlue and use the id.")
private String templateIdOption;

@ConfigProperty(name = "sendinblue.apikey")
Expand All @@ -43,6 +43,14 @@ public void run() {
long templateIdValue = 51L;

if (templateIdOption != null) {
if(templateIdOption.equalsIgnoreCase("rd")){
templateIdValue = 114L;
}

if(templateIdOption.equalsIgnoreCase("datadog")){
templateIdValue = 116L;
}

try {
templateIdValue = Long.parseLong(templateIdOption);
} catch (NumberFormatException e) {
Expand Down

0 comments on commit 1e63a65

Please sign in to comment.