Skip to content

Commit 111fa21

Browse files
author
AmiyahJo
committed
fix: updated example from anothony_mays_loader.ts file
1 parent f94ec98 commit 111fa21

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lesson_10/libraries/src/loaders/amiyah_jones.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ export class AmiyahJonesLoader implements Loader {
2121

2222
async loadMediaItems(): Promise<MediaItem[]> {
2323
// TODO: Implement this method.
24-
return [];
24+
return [
25+
26+
];
2527
}
2628

2729
async loadCredits(): Promise<Credit[]> {
@@ -30,8 +32,8 @@ export class AmiyahJonesLoader implements Loader {
3032
.createReadStream('data/credits.csv', 'utf-8')
3133
.pipe(csv());
3234
for await (const row of readable) {
33-
const { media_item_id: mediaItemId, role, name } = row;
34-
credits.push({ mediaItemId, name, role });
35+
const { media_item_id, role, name } = row;
36+
credits.push(new Credit(media_item_id, name, role));
3537
}
3638
return credits;
3739
}

0 commit comments

Comments
 (0)