Page MenuHomePhabricator

[keyserver] Add `uploadResult` to `uploadRows` object in `createUploads`
ClosedPublic

Authored by abosh on Aug 22 2022, 12:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 13, 8:03 PM
Unknown Object (File)
Sat, Apr 13, 8:03 PM
Unknown Object (File)
Sat, Apr 13, 8:03 PM
Unknown Object (File)
Sat, Apr 13, 11:58 AM
Unknown Object (File)
Sat, Apr 13, 6:12 AM
Unknown Object (File)
Sat, Apr 6, 8:15 PM
Unknown Object (File)
Sat, Apr 6, 11:41 AM
Unknown Object (File)
Sat, Apr 6, 10:02 AM
Subscribers

Details

Summary

Quick change. This is more concise because uploadRows already had a insert property to mark the array of values inserted into the uploads table, but since uploadRows was also used to create the UploadMultimediaResult[] return value of createUploads the rest of the object had to be remapped in the return statement of createUploads.

This diff adds the uploadResult property to uploadRows when the uploadInfos are first mapped (by copying the same code that was mapping uploadRows in the return statement) so that the return statement is less redundant and can just map each element of uploadRows to uploadResult.

Test Plan

console.log(...)'d the output of createUploads before and after making this change, making sure the outputs matched for the same image and video uploads.

Also verified that the uploads table looked the same for an image uploaded before and after this change.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable