mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +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/
12 lines
230 B
Ruby
12 lines
230 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreateWebhookEndpoints < ActiveRecord::Migration[6.1]
|
|
def change
|
|
create_table :webhook_endpoints do |t|
|
|
t.string :url, null: false
|
|
|
|
t.timestamps null: false
|
|
end
|
|
end
|
|
end
|