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)
Sun, Dec 15, 10:40 PM
Unknown Object (File)
Sun, Dec 15, 10:40 PM
Unknown Object (File)
Sun, Dec 15, 10:40 PM
Unknown Object (File)
Sun, Dec 15, 10:40 PM
Unknown Object (File)
Sun, Dec 15, 10:40 PM
Unknown Object (File)
Sat, Dec 14, 7:15 AM
Unknown Object (File)
Thu, Dec 12, 8:54 AM
Unknown Object (File)
Nov 23 2024, 4:27 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