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
4646** /public /sw.js
4747** /public /worker- * .js
4848** /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) => {
7878 if ( question ) {
7979 // Upload to Cosmos DB for future use
8080 try {
81- await container . items . create ( question ) ;
81+ await container . items . upsert ( question ) ;
8282 } catch ( err ) {
8383 console . warn ( "Failed to upload question to Cosmos DB:" , err ) ;
8484 }
@@ -108,7 +108,7 @@ export const CombinedQuestionsDataSource = (container: Container) => {
108108 // Upload all questions to Cosmos DB
109109 try {
110110 for ( const question of questions ) {
111- await container . items . create ( question ) ;
111+ await container . items . upsert ( question ) ;
112112 }
113113 } catch ( err ) {
114114 console . warn ( "Failed to upload questions to Cosmos DB:" , err ) ;
@@ -140,7 +140,7 @@ export const CombinedQuestionsDataSource = (container: Container) => {
140140 // Upload selected questions to Cosmos DB
141141 try {
142142 for ( const question of selected ) {
143- await container . items . create ( question ) ;
143+ await container . items . upsert ( question ) ;
144144 }
145145 } catch ( err ) {
146146 console . warn ( "Failed to upload questions to Cosmos DB:" , err ) ;
You can’t perform that action at this time.
0 commit comments