(fileId)
| 8 | } |
| 9 | |
| 10 | export async function getFile(fileId) { |
| 11 | const files = await getFiles(); |
| 12 | const file = files.find((currentFile) => currentFile.PostID.toString() === fileId.toString()); |
| 13 | if (!file) { |
| 14 | throw new Error('File not found'); |
| 15 | } |
| 16 | return file; |
| 17 | } |
| 18 | |
| 19 | export async function getFileObject(fileId) { |
| 20 | const file = await getFile(fileId); |
no test coverage detected