feat(05-02): migrate user ID to n8n credentials system
- Auth nodes now reference $credentials.telegramAuth.userId - Added telegramAuth credential reference to both IF nodes - Removed hardcoded user ID from workflow JSON - Workflow can now be safely exported/shared
This commit is contained in:
+16
-4
@@ -100,7 +100,7 @@
|
|||||||
{
|
{
|
||||||
"id": "user-auth-condition",
|
"id": "user-auth-condition",
|
||||||
"leftValue": "={{ $json.message.from.id.toString() }}",
|
"leftValue": "={{ $json.message.from.id.toString() }}",
|
||||||
"rightValue": "563878771",
|
"rightValue": "={{ $credentials.telegramAuth.userId }}",
|
||||||
"operator": {
|
"operator": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"operation": "equals"
|
"operation": "equals"
|
||||||
@@ -118,7 +118,13 @@
|
|||||||
"position": [
|
"position": [
|
||||||
680,
|
680,
|
||||||
200
|
200
|
||||||
]
|
],
|
||||||
|
"credentials": {
|
||||||
|
"telegramAuth": {
|
||||||
|
"id": "telegram-auth-credential",
|
||||||
|
"name": "Telegram Auth"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"parameters": {
|
"parameters": {
|
||||||
@@ -132,7 +138,7 @@
|
|||||||
{
|
{
|
||||||
"id": "callback-auth-condition",
|
"id": "callback-auth-condition",
|
||||||
"leftValue": "={{ $json.callback_query.from.id.toString() }}",
|
"leftValue": "={{ $json.callback_query.from.id.toString() }}",
|
||||||
"rightValue": "563878771",
|
"rightValue": "={{ $credentials.telegramAuth.userId }}",
|
||||||
"operator": {
|
"operator": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"operation": "equals"
|
"operation": "equals"
|
||||||
@@ -150,7 +156,13 @@
|
|||||||
"position": [
|
"position": [
|
||||||
680,
|
680,
|
||||||
500
|
500
|
||||||
]
|
],
|
||||||
|
"credentials": {
|
||||||
|
"telegramAuth": {
|
||||||
|
"id": "telegram-auth-credential",
|
||||||
|
"name": "Telegram Auth"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"parameters": {
|
"parameters": {
|
||||||
|
|||||||
Reference in New Issue
Block a user