feat: finish implementing getRecordById method

This commit is contained in:
Stevan Freeborn
2023-02-10 23:22:41 -06:00
parent 6ba77ce1d4
commit 0af3a9d7ca
14 changed files with 1208 additions and 104 deletions
+11 -12
View File
@@ -78,18 +78,17 @@ export class RecordValue {
*/
public asAttachmentArray(): Attachment[] {
this.validateType([RecordValueType.AttachmentList]);
const storageLocation = FileStorageSite[this.value.storageLocation];
if (storageLocation === undefined) {
throw new Error(
`${
this.value.storageLocation as string
} is not a valid FileStorageSite.`
);
}
return this.value.map((attachment: any) => {
const storageLocation = FileStorageSite[attachment.storageLocation];
if (storageLocation === undefined) {
throw new Error(
`${
this.value.storageLocation as string
} is not a valid FileStorageSite.`
);
}
const hasNotes =
attachment.notes !== null && attachment.notes !== undefined;
@@ -177,7 +176,7 @@ export class RecordValue {
scoringGroup.listValueId,
scoringGroup.name,
scoringGroup.score,
scoringGroup.maximunScore
scoringGroup.maximumScore
)
);
}