@zodic/shared 0.0.171 → 0.0.172
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.
- package/app/services/ConceptService.ts +28 -10
- package/package.json +1 -1
|
@@ -68,19 +68,37 @@ export class ConceptService {
|
|
|
68
68
|
// 🔥 If names already exist in KV but not in DO, add them
|
|
69
69
|
if (existingEN.name && !allNamesEN.includes(existingEN.name)) {
|
|
70
70
|
console.log(`⚡ Backfilling existing name to DO: ${existingEN.name}`);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
try {
|
|
72
|
+
await fetch(`${doUrl}/add`, {
|
|
73
|
+
method: 'POST',
|
|
74
|
+
body: JSON.stringify({
|
|
75
|
+
language: 'en-us',
|
|
76
|
+
name: existingEN.name,
|
|
77
|
+
}),
|
|
78
|
+
headers: { 'Content-Type': 'application/json' },
|
|
79
|
+
});
|
|
80
|
+
} catch (e) {
|
|
81
|
+
console.error(
|
|
82
|
+
`!-- Error on fetch ConceptNames ${(e as Error).message}`
|
|
83
|
+
);
|
|
84
|
+
}
|
|
76
85
|
}
|
|
77
86
|
if (existingPT.name && !allNamesPT.includes(existingPT.name)) {
|
|
78
87
|
console.log(`⚡ Backfilling existing name to DO: ${existingPT.name}`);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
try {
|
|
89
|
+
await fetch(`${doUrl}/add`, {
|
|
90
|
+
method: 'POST',
|
|
91
|
+
body: JSON.stringify({
|
|
92
|
+
language: 'pt-br',
|
|
93
|
+
name: existingPT.name,
|
|
94
|
+
}),
|
|
95
|
+
headers: { 'Content-Type': 'application/json' },
|
|
96
|
+
});
|
|
97
|
+
} catch (e) {
|
|
98
|
+
console.error(
|
|
99
|
+
`!-- Error on fetch ConceptNames ${(e as Error).message}`
|
|
100
|
+
);
|
|
101
|
+
}
|
|
84
102
|
}
|
|
85
103
|
|
|
86
104
|
// ✅ Skip generation if basic info already exists and override is false
|