hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | /** |
| 2 | * One run day's school report door, spelled once: the two requests go through |
| 3 | * `client`/`blobClient`, which add `/api` themselves, while the download link |
| 4 | * has to carry the prefix — so the prefixed form is built from the same path. |
| 5 | * |
| 6 | * `runDay` is the ledger row's own `run_day` (`YYYY-MM-DD`). A day nothing was |
| 7 | * generated for answers `409 report_missing`; a caller below manager is refused. |
| 8 | */ |
| 9 | export function insightRunReportPath(runDay: string): string { |
| 10 | return `/insights/runs/${encodeURIComponent(runDay)}/report`; |
| 11 | } |
| 12 | |
| 13 | /** The same door as a same-origin URL — hand it to an `<a href>`: the session cookie rides along. */ |
| 14 | export function insightRunReportUrl(runDay: string): string { |
| 15 | return `/api${insightRunReportPath(runDay)}`; |
| 16 | } |