-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add webhook stores #13
Conversation
Ideas for better name are welcome :) |
The intent isn't clear to me. If you want to use another model or table, you can specify that in the config. My feeling is that have a store layer on top is too complex. Maybe you could guide me through the actual use case where this is needed. |
Apply fixes from StyleCI
So in a project we're building right now we need some additional data on the model, though this data can also be found in the raw JSON payload, you don't want to use this field to query for certain webhooks(what if the format of the JSON changes through the application lifetime). For example in our project we have a status attached to each webhook, we need to check if a status was already received in the past so we can accept/reject the webhook coming in. So a simple The problem with the current implementation of the package is that we have no control over the creation of the webhook model. This means our status column should be null so an initial webhook model can be constructed without errors. But at time of creating the model we have the status field, so why not fill it right in? This is where this PR become important, you can create a model with a status column filled in by creating a custom webhook store class which handles the creating of the model. |
How about creating your own model, and add a In the package we could to add a dedicated |
Really like that idea! I will try to implement this as soon as possible |
Closing this in favour of your next PR :-) |
Add the possibility to implement your own WebhookStore: your own implementation of storing a WebhookCall model in the database.