webhookdb 1.2.1 → 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: 449e2e3d37eaf61467720f1360355b427f71032cfbf3322165be61b8b01922ea
4
- data.tar.gz: 045152c0ea6fce9ce154abc59ba149c97a9b9ab9e85da3ac007fa2e6db88ec43
3
+ metadata.gz: ef2d9fcdc133a68700b6462149580dbc63aa2d1217fbb6ba6135575954da17f3
4
+ data.tar.gz: 10ed6de408248a2700dd3e4df69b4485569e9ea180cf58130020c11127dcf603
5
5
  SHA512:
6
- metadata.gz: 9b33b003d0f25c220f3092bebbf0fe97f594b0f4bc6870395a96d169e990a02321f3a78a4b38491589866375b0846ce38d61b4ce779f05cb709f3801f4563f2b
7
- data.tar.gz: c61e78f300e587f096de14c34f8d6c0ca14dc32006ae79a9fdf5a2bc79f0be0fc868c351f28b57f0c49eb4f183fe933e70373ac0a5b99868eb7e9a76b64127c8
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.1"
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.1
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