Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert webhooks.event_filter None, {} to [] #3

Merged
merged 1 commit into from
Aug 10, 2024

Conversation

bigcat88
Copy link
Member

@bigcat88 bigcat88 commented Aug 9, 2024

without this webhooks got constantly updated:

webhooks_syncing(expected_listeners):
 [
    {
        "webhook": "/api/w/nextcloud/jobs/run/f/u/wapp_jos/file_creation",
        "filters": {},
        "events": [
            "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
        ]
    }
]
get_registered_listeners:  [
    {
        "id": 1,
        "appId": "windmill_app",
        "userId": null,
        "httpMethod": "POST",
        "uri": "/api/w/nextcloud/jobs/run/f/u/wapp_jos/file_creation",
        "event": "OCP\\Files\\Events\\Node\\NodeWrittenEvent",
        "eventFilter": null,
        "userIdFilter": "",
        "headers": null,
        "authMethod": "header",
        "authData": "EDITED"
    }
]
webhooks_syncing: before update_listener: {"id": 1, "appId": "windmill_app", "userId": null, "httpMethod": "POST", "uri": "/api/w/nextcloud/jobs/run/f/u/wapp_jos/file_creation", "event": "OCP\\Files\\Events\\Node\\NodeWrittenEvent", "eventFilter": null, "userIdFilter": "", "headers": null, "authMethod": "header", "authData": "EDITED"}
update_listener: /api/w/nextcloud/jobs/run/f/u/wapp_jos/file_creation - OCP\Files\Events\Node\NodeWrittenEvent
{}
update_listener:
 {
    "id": 1,
    "appId": "windmill_app",
    "userId": null,
    "httpMethod": "POST",
    "uri": "/api/w/nextcloud/jobs/run/f/u/wapp_jos/file_creation",
    "event": "OCP\\Files\\Events\\Node\\NodeWrittenEvent",
    "eventFilter": [],
    "userIdFilter": "",
    "headers": null,
    "authMethod": "header",
    "authData":"EDITED"
}
/api/w/nextcloud/jobs/list

My suggestion is to just convert when value is empty always it to format of []

@bigcat88 bigcat88 merged commit d214f6b into main Aug 10, 2024
1 check passed
@bigcat88 bigcat88 deleted the fix/webhooks-event_filter branch October 17, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants