Configure new Telegram bot token across frontend Admin dashboard and Python bot service
Some checks failed
Deploy RIT Freshers Hub to VPS / Deploy to Live VPS (push) Has been cancelled
Some checks failed
Deploy RIT Freshers Hub to VPS / Deploy to Live VPS (push) Has been cancelled
This commit is contained in:
@@ -471,7 +471,7 @@ export default function AdminDashboard() {
|
|||||||
|
|
||||||
if (!localConfig || (!localConfig.seniorHelpers?.length && !localConfig.helper_chat_ids?.length)) {
|
if (!localConfig || (!localConfig.seniorHelpers?.length && !localConfig.helper_chat_ids?.length)) {
|
||||||
localConfig = {
|
localConfig = {
|
||||||
community_bot_token: '7829148291:AAH_rit_community_bot_token_sample',
|
community_bot_token: '8973721012:AAG37F4Q4q584m_2aS8rT6qSWuA-WuHRGMY',
|
||||||
spring_backend_url: 'https://rit-services.in/api',
|
spring_backend_url: 'https://rit-services.in/api',
|
||||||
helper_chat_ids: [971749136, 982314512],
|
helper_chat_ids: [971749136, 982314512],
|
||||||
seniorHelpers: [
|
seniorHelpers: [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"community_bot_token": "",
|
"community_bot_token": "8973721012:AAG37F4Q4q584m_2aS8rT6qSWuA-WuHRGMY",
|
||||||
"telegram_bot_token": "",
|
"telegram_bot_token": "8973721012:AAG37F4Q4q584m_2aS8rT6qSWuA-WuHRGMY",
|
||||||
"helper_chat_ids": [971749136, 5567776672, 1873240361],
|
"helper_chat_ids": [971749136, 5567776672, 1873240361],
|
||||||
"spring_backend_url": "http://localhost:8085"
|
"spring_backend_url": "http://localhost:8085"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ CONFIG_PATH = os.path.join(os.path.dirname(__file__), "config.json")
|
|||||||
def load_config():
|
def load_config():
|
||||||
if not os.path.exists(CONFIG_PATH):
|
if not os.path.exists(CONFIG_PATH):
|
||||||
default_config = {
|
default_config = {
|
||||||
"community_bot_token": "8859374355:AAH0dhwstkTBhRerRTjzmb2RG2fjPbigzvo",
|
"community_bot_token": "8973721012:AAG37F4Q4q584m_2aS8rT6qSWuA-WuHRGMY",
|
||||||
"telegram_bot_token": "8913773505:AAHASuKLLOto3Ax573_dxg8bnvQy2ML6yLk",
|
"telegram_bot_token": "8973721012:AAG37F4Q4q584m_2aS8rT6qSWuA-WuHRGMY",
|
||||||
"helper_chat_ids": [],
|
"helper_chat_ids": [],
|
||||||
"spring_backend_url": "http://localhost:8085"
|
"spring_backend_url": "http://localhost:8085"
|
||||||
}
|
}
|
||||||
@@ -50,7 +50,7 @@ def load_config():
|
|||||||
return json.load(f)
|
return json.load(f)
|
||||||
|
|
||||||
config = load_config()
|
config = load_config()
|
||||||
COMMUNITY_BOT_TOKEN = os.environ.get("COMMUNITY_BOT_TOKEN") or config.get("community_bot_token", "8859374355:AAH0dhwstkTBhRerRTjzmb2RG2fjPbigzvo")
|
COMMUNITY_BOT_TOKEN = os.environ.get("COMMUNITY_BOT_TOKEN") or config.get("community_bot_token", "8973721012:AAG37F4Q4q584m_2aS8rT6qSWuA-WuHRGMY")
|
||||||
BOT_TOKEN = os.environ.get("TELEGRAM_BOT_TOKEN") or config.get("telegram_bot_token")
|
BOT_TOKEN = os.environ.get("TELEGRAM_BOT_TOKEN") or config.get("telegram_bot_token")
|
||||||
BACKEND_URL = os.environ.get("SPRING_BACKEND_URL") or config.get("spring_backend_url", "http://localhost:8085")
|
BACKEND_URL = os.environ.get("SPRING_BACKEND_URL") or config.get("spring_backend_url", "http://localhost:8085")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user