@pronto-tools-and-more/pronto 12.23.0 → 12.25.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +11 -11
- package/src/parts/App/App.js +4 -1
- package/src/parts/Config/Config.js +3 -0
- package/src/parts/CreateServer/CreateServer.js +2 -0
- package/src/parts/GraphQlQueryCollection/GraphQlQueryCollection.js +227 -0
- package/src/parts/GraphQlQueryCollections/GraphQlQueryCollections.js +227 -0
- package/src/parts/GraphQlQueryContent/GraphQlQueryContent.js +198 -0
- package/src/parts/GraphQlQueryPathSegments/GraphQlQueryPathSegments.js +59 -0
- package/src/parts/HandleApi/HandleApi.js +25 -7
- package/src/parts/HandleApiArticle/HandleApiArticle.js +99 -0
- package/src/parts/HandleApiAuthors/HandleApiAuthors.js +32 -31
- package/src/parts/HandleApiCategories/HandleApiCategories.js +32 -31
- package/src/parts/HandleApiCollection/HandleApiCollection.js +53 -0
- package/src/parts/HandleApiCollections/HandleApiCollections.js +49 -0
- package/src/parts/HandleApiDossier/HandleApiDossier.js +60 -59
- package/src/parts/HandleApiDossiers/HandleApiDossiers.js +32 -31
- package/src/parts/HandleApiIndex/HandleApiIndex.js +1 -0
- package/src/parts/HandleApiIssues/HandleApiIssues.js +32 -31
- package/src/parts/Version/Version.js +1 -1
@@ -1,34 +1,35 @@
|
|
1
1
|
import * as GraphQlQueryIssues from "../GraphQlQueryIssues/GraphQlQueryIssues.js";
|
2
2
|
|
3
|
-
export const handleIssues =
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
const result = await response.json();
|
25
|
-
// @ts-ignore
|
26
|
-
const realData = result.data.catalog.contentsConnection.edges
|
27
|
-
.map((edge) => edge.content)
|
28
|
-
.map((node) => {
|
29
|
-
const { __typename, ...rest } = node;
|
30
|
-
return rest;
|
3
|
+
export const handleIssues =
|
4
|
+
({ appId, apiUrl }) =>
|
5
|
+
async (req, res, next) => {
|
6
|
+
const realBottom = {
|
7
|
+
...GraphQlQueryIssues.bottom,
|
8
|
+
appInfo: {
|
9
|
+
...GraphQlQueryIssues.bottom.appInfo,
|
10
|
+
appId,
|
11
|
+
},
|
12
|
+
};
|
13
|
+
const response = await fetch(apiUrl, {
|
14
|
+
method: "POST",
|
15
|
+
headers: {
|
16
|
+
Accept: "application/json",
|
17
|
+
"Content-Type": "application/json",
|
18
|
+
},
|
19
|
+
body: JSON.stringify({
|
20
|
+
operationName: "CatalogContentsQuery",
|
21
|
+
query: GraphQlQueryIssues.top,
|
22
|
+
variables: realBottom,
|
23
|
+
}),
|
31
24
|
});
|
32
|
-
|
33
|
-
|
34
|
-
|
25
|
+
const result = await response.json();
|
26
|
+
// @ts-ignore
|
27
|
+
const realData = result.data.catalog.contentsConnection.edges
|
28
|
+
.map((edge) => edge.content)
|
29
|
+
.map((node) => {
|
30
|
+
const { __typename, ...rest } = node;
|
31
|
+
return rest;
|
32
|
+
});
|
33
|
+
res.setHeader("content-type", "application/json");
|
34
|
+
res.send(JSON.stringify(realData, null, 2));
|
35
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
export const version = '12.
|
1
|
+
export const version = '12.25.0'
|