@@ -97,13 +97,13 @@ public async Task<string> GetDocumentMetadata(
9797
9898 return JsonSerializer . Serialize ( new
9999 {
100- document . Key ,
101- document . Project ,
102- document . Tags ,
103- document . UpdatedAt ,
104- document . UpdatedBy ,
105- document . ContentHash ,
106- document . ContentLength
100+ key = document . Key ,
101+ project = document . Project ,
102+ tags = document . Tags ,
103+ updatedAt = document . UpdatedAt ,
104+ updatedBy = document . UpdatedBy ,
105+ contentHash = document . ContentHash ,
106+ contentLength = document . ContentLength
107107 } ) ;
108108 }
109109
@@ -154,8 +154,8 @@ public async Task<string> CompareDocument(
154154 storedContentHash = document . ContentHash ,
155155 storedContentLength = document . ContentLength ,
156156 candidateHash ,
157- document . UpdatedAt ,
158- document . UpdatedBy
157+ updatedAt = document . UpdatedAt ,
158+ updatedBy = document . UpdatedBy
159159 } ) ;
160160 }
161161
@@ -174,17 +174,17 @@ public async Task<string> ListDocuments(
174174 {
175175 return JsonSerializer . Serialize ( new [ ]
176176 {
177- new { documents [ 0 ] . Key , documents [ 0 ] . Content }
177+ new { key = documents [ 0 ] . Key , content = documents [ 0 ] . Content }
178178 } ) ;
179179 }
180180
181181 var projection = documents . Select ( d => new
182182 {
183- d . Key ,
184- d . Tags ,
185- d . UpdatedAt ,
186- d . UpdatedBy ,
187- d . Project
183+ key = d . Key ,
184+ tags = d . Tags ,
185+ updatedAt = d . UpdatedAt ,
186+ updatedBy = d . UpdatedBy ,
187+ project = d . Project
188188 } ) ;
189189
190190 return JsonSerializer . Serialize ( projection ) ;
@@ -258,12 +258,13 @@ public async Task<string> AppendDocument(
258258
259259 return JsonSerializer . Serialize ( new
260260 {
261- saved . Key ,
262- saved . Project ,
263- saved . Tags ,
264- saved . UpdatedAt ,
265- saved . UpdatedBy ,
266- ContentLength = saved . Content . Length
261+ key = saved . Key ,
262+ project = saved . Project ,
263+ tags = saved . Tags ,
264+ updatedAt = saved . UpdatedAt ,
265+ updatedBy = saved . UpdatedBy ,
266+ contentHash = saved . ContentHash ,
267+ contentLength = saved . Content . Length
267268 } ) ;
268269 }
269270 catch ( Exception ex )
@@ -329,17 +330,18 @@ public async Task<string> UpsertDocumentChunked(
329330 {
330331 key ,
331332 project = resolvedProject ,
332- result . Status ,
333- result . ChunksReceived ,
334- result . TotalChunks ,
335- Document = result . Document is null ? null : new
333+ status = result . Status ,
334+ chunksReceived = result . ChunksReceived ,
335+ totalChunks = result . TotalChunks ,
336+ document = result . Document is null ? null : new
336337 {
337- result . Document . Key ,
338- result . Document . Project ,
339- result . Document . Tags ,
340- result . Document . UpdatedAt ,
341- result . Document . UpdatedBy ,
342- ContentLength = result . Document . Content . Length
338+ key = result . Document . Key ,
339+ project = result . Document . Project ,
340+ tags = result . Document . Tags ,
341+ updatedAt = result . Document . UpdatedAt ,
342+ updatedBy = result . Document . UpdatedBy ,
343+ contentHash = result . Document . ContentHash ,
344+ contentLength = result . Document . Content . Length
343345 }
344346 } ) ;
345347 }
@@ -366,17 +368,17 @@ public async Task<string> SearchDocuments(
366368 {
367369 return JsonSerializer . Serialize ( new [ ]
368370 {
369- new { documents [ 0 ] . Key , documents [ 0 ] . Content }
371+ new { key = documents [ 0 ] . Key , content = documents [ 0 ] . Content }
370372 } ) ;
371373 }
372374
373375 var projection = documents . Select ( d => new
374376 {
375- d . Key ,
376- d . Tags ,
377- d . UpdatedAt ,
378- d . Project ,
379- ContentExcerpt = d . Content . Length > 300 ? d . Content [ ..300 ] + "..." : d . Content
377+ key = d . Key ,
378+ tags = d . Tags ,
379+ updatedAt = d . UpdatedAt ,
380+ project = d . Project ,
381+ contentExcerpt = d . Content . Length > 300 ? d . Content [ ..300 ] + "..." : d . Content
380382 } ) ;
381383
382384 return JsonSerializer . Serialize ( projection ) ;
0 commit comments