回答編集履歴
1
足りてなかったコードを追加
test
CHANGED
@@ -6,11 +6,37 @@
|
|
6
6
|
|
7
7
|
```ここに言語を入力
|
8
8
|
|
9
|
+
const ctfConfig = getConfigForKeys([
|
10
|
+
|
11
|
+
'CTF_TYPE_ID',
|
12
|
+
|
13
|
+
'CTF_SPACE_ID',
|
14
|
+
|
15
|
+
'CTF_CDA_ACCESS_TOKEN'
|
16
|
+
|
17
|
+
]);
|
18
|
+
|
19
|
+
const { createClient } = require('./plugins/contentful')
|
20
|
+
|
21
|
+
const cdaClient = createClient(ctfConfig)
|
22
|
+
|
23
|
+
const clientPromise = cdaClient.getEntries({
|
24
|
+
|
25
|
+
'content_type': 'client',
|
26
|
+
|
27
|
+
order: '-sys.createdAt'
|
28
|
+
|
29
|
+
});
|
30
|
+
|
31
|
+
module.exports ={
|
32
|
+
|
33
|
+
mode: 'universal',
|
34
|
+
|
9
|
-
generate: {
|
35
|
+
generate: {
|
10
36
|
|
11
37
|
async routes() {
|
12
38
|
|
13
|
-
return Promise.all([clientPromise
|
39
|
+
return Promise.all([clientPromise])
|
14
40
|
|
15
41
|
.then(([hoges]) => {
|
16
42
|
|
@@ -34,6 +60,8 @@
|
|
34
60
|
|
35
61
|
});
|
36
62
|
|
63
|
+
}
|
64
|
+
|
37
65
|
}
|
38
66
|
|
39
67
|
```
|