webhookdb 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef2d9fcdc133a68700b6462149580dbc63aa2d1217fbb6ba6135575954da17f3
|
4
|
+
data.tar.gz: 10ed6de408248a2700dd3e4df69b4485569e9ea180cf58130020c11127dcf603
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/webhookdb/version.rb
CHANGED
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.
|
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
|