webhookdb 1.2.0 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2c4da6abd3c5def6f27e180aaf435a4e9293eae4a1f926a065b87c1979372b3
4
- data.tar.gz: 72de7406adc5049255878c5bf16fe05e92716d18c2f2492d996dbddb6b0aa307
3
+ metadata.gz: ef2d9fcdc133a68700b6462149580dbc63aa2d1217fbb6ba6135575954da17f3
4
+ data.tar.gz: 10ed6de408248a2700dd3e4df69b4485569e9ea180cf58130020c11127dcf603
5
5
  SHA512:
6
- metadata.gz: 725e0d6183cd7bfd259a4202c888e419658f77288de59adf2df1a6e48c36a06dd4f91857d43ac07f54e81aa9ee882a8e65813d3cb92d6cee0576d74a745ed28c
7
- data.tar.gz: 6811f58d123c6693758c75c3e5ba4de991c7a5e3d621de581ac32fe76efb63ca8e910757cc3e42d18029fd10389c11d74b8255601781ed5c9267e042e0f7ca96
6
+ metadata.gz: f6da4594af239fd6bafd27aa6301c687151ab2a42f9cb246f7505bd19543daacfbbb7c806577e838fc4d4847724b782f3544c4cd406ab0aebfa81b499a4e8b91
7
+ data.tar.gz: 473cd3d31ee8fb021249e97f0da82db80cc6a063d7742cff92efbea9129e11851270b59bd97d2c94fd3a8a650932df02df6674ae27e91e32a67b7f937c14aa52
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ Sequel.migration do
4
+ up do
5
+ alter_table(:saved_queries) do
6
+ drop_constraint(:saved_queries_organization_id_key)
7
+ add_index :organization_id
8
+ end
9
+ end
10
+
11
+ down do
12
+ alter_table(:saved_queries) do
13
+ drop_index :organization_id
14
+ add_unique_constraint(:organization_id)
15
+ end
16
+ end
17
+ end
@@ -188,6 +188,7 @@ class Webhookdb::API::SavedQueries < Webhookdb::API::V1
188
188
  get :run do
189
189
  # This endpoint can be used publicly, so should expose as little information as possible.
190
190
  # Do not expose permissions or query details.
191
+ use_http_expires_caching(5.minute)
191
192
  cq = Webhookdb::SavedQuery[opaque_id: params[:query_identifier]]
192
193
  forbidden! if cq.nil?
193
194
  if cq.private?
@@ -30,6 +30,14 @@ module Webhookdb::Service::Middleware
30
30
  credentials: true,
31
31
  expose: ["ETag", Webhookdb::Service::AUTH_TOKEN_HEADER]
32
32
  end
33
+ allow do
34
+ origins("*")
35
+ resource "/v1/saved_queries/*",
36
+ headers: :any,
37
+ methods: [:get],
38
+ credentials: false,
39
+ expose: "*"
40
+ end
33
41
  end
34
42
  end
35
43
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Webhookdb
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webhookdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - WebhookDB
@@ -854,6 +854,7 @@ files:
854
854
  - db/migrations/037_oauth_used.rb
855
855
  - db/migrations/038_webhookdb_api_key.rb
856
856
  - db/migrations/039_saved_query.rb
857
+ - db/migrations/040_saved_query_fix_unique.rb
857
858
  - integration/async_spec.rb
858
859
  - integration/auth_spec.rb
859
860
  - integration/database_spec.rb