summaryrefslogtreecommitdiff
path: root/lib/VN3/Docs/JS.pm
blob: 12e31f83efa5bf05d30e7615f518a920b6a49260 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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;