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)
Mon, Nov 11, 2:51 AM
Unknown Object (File)
Sat, Nov 2, 1:15 PM
Unknown Object (File)
Sat, Nov 2, 1:15 PM
Unknown Object (File)
Sat, Nov 2, 1:15 PM
Unknown Object (File)
Sat, Nov 2, 1:12 PM
Unknown Object (File)
Mon, Oct 28, 5:31 AM
Unknown Object (File)
Mon, Oct 28, 4:58 AM
Unknown Object (File)
Mon, Oct 28, 2:41 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
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage