Moved auth token to an applicaiton property

This commit is contained in:
Christopher Knapczyk 2023-07-29 14:16:04 -05:00
parent 186026c945
commit ccba4c56ea
2 changed files with 6 additions and 2 deletions

View file

@ -17,6 +17,9 @@ public class CamelConfiguration extends RouteBuilder {
@ConfigProperty(name = "telegram.chatid")
String chatId;
@ConfigProperty(name = "telegram.authtoken")
String authToken;
@Override
public void configure() {
from(proxmoxRoute)
@ -36,6 +39,6 @@ public class CamelConfiguration extends RouteBuilder {
exchange.getIn().setBody(textMessage);
}
})
.to("telegram:bots?authorizationToken=bot5682031576:AAFr53phRURd130PyfJUoPdXQ7svy1wlcwo&chatId=" + chatId);
.to("telegram:bots?authorizationToken=" + authToken + "&chatId=" + chatId);
}
}

View file

@ -1,2 +1,3 @@
proxmox.route = ${PROXMOX_ROUTE}
telegram.chatid = ${CHAT_ID}
telegram.chatid = ${CHAT_ID}
telegram.authtoken = ${AUTH_TOKEN}