Method
get
(@Param("path") path: string | string[], @Res() res: Response)
Source from the content-addressed store, hash-verified
| 9 | @Public() |
| 10 | @Get("*path") |
| 11 | get(@Param("path") path: string | string[], @Res() res: Response): void { |
| 12 | const slug = Array.isArray(path) ? path : String(path).split("/"); |
| 13 | const md = readDoc(slug); |
| 14 | if (md === null) { |
| 15 | res.status(404).send("not found"); |
| 16 | return; |
| 17 | } |
| 18 | res.setHeader("content-type", "text/markdown; charset=utf-8"); |
| 19 | res.send(md); |
| 20 | } |
| 21 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected