notion_to_html 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/notion_to_html/service.rb +14 -12
- data/lib/notion_to_html/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bb5384177410067721ce9fda929edadb1999137f41b7f31824b87eddd91fc6c
|
4
|
+
data.tar.gz: d52f39a1f258255077e6c6a33516429886ec18dcee0dfbc01b64c50f402232c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec68e95cc07829842e3b8d4c7a99df80b05da4ce60cab3f7ed31ac3c03cdd08af914d588d020e33ceab4af1777bba08e572ccb4c776af05a359507b2449c463a
|
7
|
+
data.tar.gz: f0b4e39a13fae034448df686d262acd7d6ebbc96d85a6d50effb64af2a3ae9457525dd674a841160cc1d1bb76f6a063d2bb10dca7cac4013e67a855dbd7200fe
|
@@ -24,9 +24,19 @@ module NotionToHtml
|
|
24
24
|
}
|
25
25
|
}
|
26
26
|
]
|
27
|
+
or_query = []
|
27
28
|
|
28
|
-
if
|
29
|
+
if tag
|
29
30
|
query.push({
|
31
|
+
property: 'tags',
|
32
|
+
multi_select: {
|
33
|
+
contains: tag
|
34
|
+
}
|
35
|
+
})
|
36
|
+
end
|
37
|
+
|
38
|
+
if slug
|
39
|
+
or_query.push({
|
30
40
|
property: 'slug',
|
31
41
|
rich_text: {
|
32
42
|
equals: slug
|
@@ -35,7 +45,7 @@ module NotionToHtml
|
|
35
45
|
end
|
36
46
|
|
37
47
|
if name
|
38
|
-
|
48
|
+
or_query.push({
|
39
49
|
property: 'name',
|
40
50
|
title: {
|
41
51
|
contains: name
|
@@ -44,7 +54,7 @@ module NotionToHtml
|
|
44
54
|
end
|
45
55
|
|
46
56
|
if description
|
47
|
-
|
57
|
+
or_query.push({
|
48
58
|
property: 'description',
|
49
59
|
rich_text: {
|
50
60
|
contains: description
|
@@ -52,15 +62,7 @@ module NotionToHtml
|
|
52
62
|
})
|
53
63
|
end
|
54
64
|
|
55
|
-
|
56
|
-
query.push({
|
57
|
-
property: 'tags',
|
58
|
-
multi_select: {
|
59
|
-
contains: tag
|
60
|
-
}
|
61
|
-
})
|
62
|
-
end
|
63
|
-
|
65
|
+
query.push('or': or_query) unless or_query.blank?
|
64
66
|
query
|
65
67
|
end
|
66
68
|
|