mirror of
https://github.com/langgenius/dify.git
synced 2026-04-15 18:06:36 +08:00
chore: add comments on generate_webhook_id
This commit is contained in:
parent
9898730cc5
commit
d22404994a
@ -687,6 +687,10 @@ class WebhookService:
|
||||
|
||||
@classmethod
|
||||
def generate_webhook_id(cls) -> str:
|
||||
"""Generate unique 24-character webhook ID"""
|
||||
"""
|
||||
Generate unique 24-character webhook ID
|
||||
|
||||
Deduplication is not needed, DB already has unique constraint on webhook_id.
|
||||
"""
|
||||
# Generate 24-character random string
|
||||
return secrets.token_urlsafe(18)[:24] # token_urlsafe gives base64url, take first 24 chars
|
||||
|
||||
Loading…
Reference in New Issue
Block a user