File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change
1
+ AZURE_COSMOSDB_CONTAINER =
2
+ AZURE_COSMOSDB_DATABASE =
3
+ AZURE_COSMOSDB_ENDPOINT =
4
+ AZURE_COSMOSDB_KEY =
Original file line number Diff line number Diff line change @@ -46,3 +46,6 @@ next-env.d.ts
46
46
** /public /sw.js
47
47
** /public /worker- * .js
48
48
** /public /sw.js.map
49
+
50
+ bundles
51
+ .env
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ export const CombinedQuestionsDataSource = (container: Container) => {
78
78
if ( question ) {
79
79
// Upload to Cosmos DB for future use
80
80
try {
81
- await container . items . create ( question ) ;
81
+ await container . items . upsert ( question ) ;
82
82
} catch ( err ) {
83
83
console . warn ( "Failed to upload question to Cosmos DB:" , err ) ;
84
84
}
@@ -108,7 +108,7 @@ export const CombinedQuestionsDataSource = (container: Container) => {
108
108
// Upload all questions to Cosmos DB
109
109
try {
110
110
for ( const question of questions ) {
111
- await container . items . create ( question ) ;
111
+ await container . items . upsert ( question ) ;
112
112
}
113
113
} catch ( err ) {
114
114
console . warn ( "Failed to upload questions to Cosmos DB:" , err ) ;
@@ -140,7 +140,7 @@ export const CombinedQuestionsDataSource = (container: Container) => {
140
140
// Upload selected questions to Cosmos DB
141
141
try {
142
142
for ( const question of selected ) {
143
- await container . items . create ( question ) ;
143
+ await container . items . upsert ( question ) ;
144
144
}
145
145
} catch ( err ) {
146
146
console . warn ( "Failed to upload questions to Cosmos DB:" , err ) ;
You can’t perform that action at this time.
0 commit comments