mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
This will store the URL for each user that wants a notification. We probably don't need URL validation (it's not done on Enterprise for example). It could be validated by browser input, and anyway will be validated if the webhook actually works or not. Inspired by Keygen: https://keygen.sh/blog/how-to-build-a-webhook-system-in-rails-using-sidekiq/
7 lines
159 B
Ruby
7 lines
159 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Records a webhook url to send notifications to
|
|
class WebhookEndpoint < ApplicationRecord
|
|
validates :url, presence: true
|
|
end
|