(fileKey: string, workspaceId?: string)
| 922 | * @returns Viewer URL string or null if workspaceId cannot be determined |
| 923 | */ |
| 924 | export function getViewerUrl(fileKey: string, workspaceId?: string): string | null { |
| 925 | const resolvedWorkspaceId = workspaceId || extractWorkspaceIdFromExecutionKey(fileKey) |
| 926 | |
| 927 | if (!resolvedWorkspaceId) { |
| 928 | return null |
| 929 | } |
| 930 | |
| 931 | return `/workspace/${resolvedWorkspaceId}/files/${fileKey}` |
| 932 | } |
no test coverage detected