mirror of
https://github.com/langgenius/dify.git
synced 2026-01-14 06:07:33 +08:00
- Replaced `is_editor` checks with `has_edit_permission` in `workflow_trigger.py` and `workflow.py` to enhance clarity and consistency in permission handling. - Updated the rate limiter to use `datetime.now(UTC)` instead of `datetime.utcnow()` for accurate time handling. - Added `__all__` declaration in `trigger/__init__.py` for better module export management. - Initialized `debug_dispatched` variable in `trigger_processing_tasks.py` to ensure proper tracking during workflow dispatching. These changes improve code readability and maintainability while ensuring correct permission checks and time management.
13 lines
260 B
Python
13 lines
260 B
Python
from flask import Blueprint
|
|
|
|
# Create trigger blueprint
|
|
bp = Blueprint("trigger", __name__, url_prefix="/triggers")
|
|
|
|
# Import routes after blueprint creation to avoid circular imports
|
|
from . import trigger, webhook
|
|
|
|
__all__ = [
|
|
"trigger",
|
|
"webhook",
|
|
]
|