Moved auth token to an applicaiton property
This commit is contained in:
parent
186026c945
commit
ccba4c56ea
2 changed files with 6 additions and 2 deletions
|
|
@ -17,6 +17,9 @@ public class CamelConfiguration extends RouteBuilder {
|
||||||
@ConfigProperty(name = "telegram.chatid")
|
@ConfigProperty(name = "telegram.chatid")
|
||||||
String chatId;
|
String chatId;
|
||||||
|
|
||||||
|
@ConfigProperty(name = "telegram.authtoken")
|
||||||
|
String authToken;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configure() {
|
public void configure() {
|
||||||
from(proxmoxRoute)
|
from(proxmoxRoute)
|
||||||
|
|
@ -36,6 +39,6 @@ public class CamelConfiguration extends RouteBuilder {
|
||||||
exchange.getIn().setBody(textMessage);
|
exchange.getIn().setBody(textMessage);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.to("telegram:bots?authorizationToken=bot5682031576:AAFr53phRURd130PyfJUoPdXQ7svy1wlcwo&chatId=" + chatId);
|
.to("telegram:bots?authorizationToken=" + authToken + "&chatId=" + chatId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,3 @@
|
||||||
proxmox.route = ${PROXMOX_ROUTE}
|
proxmox.route = ${PROXMOX_ROUTE}
|
||||||
telegram.chatid = ${CHAT_ID}
|
telegram.chatid = ${CHAT_ID}
|
||||||
|
telegram.authtoken = ${AUTH_TOKEN}
|
||||||
Loading…
Reference in a new issue