diff options
Diffstat (limited to 'lib/VN3/Docs/JS.pm')
-rw-r--r-- | lib/VN3/Docs/JS.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/VN3/Docs/JS.pm b/lib/VN3/Docs/JS.pm new file mode 100644 index 00000000..12e31f83 --- /dev/null +++ b/lib/VN3/Docs/JS.pm @@ -0,0 +1,13 @@ +package Docs::JS; + +use VN3::Prelude; +use VN3::Docs::Lib; + +json_api '/js/markdown.json', { + content => { required => 0, default => '' } +}, sub { + tuwf->resJSON({Unauth => 1}) if !auth->permDbmod; + tuwf->resJSON({Content => md2html shift->{content}}); +}; + +1; |