JOE
2018-10-26 4946b7c6646d81ec07be075ef890e33723b7be8f
add api test page
4 files modified
16 ■■■■ changed files
public/css/style.css 2 ●●● patch | view | raw | blame | history
public/css/style.css.map 2 ●●● patch | view | raw | blame | history
public/css/style.scss 2 ●●● patch | view | raw | blame | history
routes/index.js 10 ●●●●● patch | view | raw | blame | history
public/css/style.css
....@@ -53,7 +53,7 @@
5353 .content label {
5454 line-height: 30px; }
5555 .content .error {
56
- color: #ff5f1f; }
56
+ color: #ff5f1f !important; }
5757
5858 .sub-link div {
5959 font-size: 11px;
public/css/style.css.map
....@@ -5,5 +5,5 @@
55 "style.scss"
66 ],
77 "names": [],
8
- "mappings": "AAAA,AAAA,IAAI,CAAC;EACJ,IAAI,EAAE,kDAAkD,GACxD;;AAED,AAAA,QAAQ,CAAC;EACL,MAAM,EAAE,4BAA4B;EACpC,KAAK,EAAE,gBAAgB;EACvB,OAAO,EAAE,eAAe;EACxB,MAAM,EAAE,eAAe,GAC1B;;AAED,AAAA,KAAK,CAAA;EACD,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,OAAO;EACnB,QAAQ,EAAE,KAAK;EACf,IAAI,EAAE,CAAC;EACP,GAAG,EAAE,CAAC;EACN,MAAM,EAAE,CAAC,GAMZ;EAbD,AASI,KATC,CASD,GAAG,CAAC;IACH,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,SAAS,GAClB;;AAGL,AAAA,YAAY,CAAC;EACZ,QAAQ,EAAE,KAAK;EACf,IAAI,EAAE,KAAK;EACX,GAAG,EAAE,GAAG;EACR,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,CAAC;EACR,OAAO,EAAE,IAAI,GASb;EAfD,AAQC,YARW,CAQX,CAAC,CAAC;IACE,KAAK,EAAE,OAAO;IACd,eAAe,EAAE,IAAI;IACrB,SAAS,EAAE,IAAI;IACf,YAAY,EAAE,IAAI;IAClB,MAAM,EAAE,OAAO,GAClB;;AAGF,AAAA,QAAQ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K;EACf,IAAI,EAAE,KAAK;EACX,GAAG,EAAE,GAAG;EACR,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,CAAC;EACR,OAAO,EAAE,IAAI,GASb;EAfD,AAQC,YARW,CAQX,CAAC,CAAC;IACE,KAAK,EAAE,OAAO;IACd,eAAe,EAAE,IAAI;IACrB,SAAS,EAAE,IAAI;IACf,YAAY,EAAE,IAAI;IAClB,MAAM,EAAE,OAAO,GAClB;;AAGF,AAAA,QAAQ,CAAC;EACL,QAAQ,EAAE,KAAK;EACf,IAAI,EAAE,KAAK;EACX,GAAG,EAAE,IAAI;EACT,MAAM,EAAE,CAAC;EACT,KAAK,EAAE,CAAC;EACR,OAAO,EAAE,gBAAgB;EACzB,aAAa,EAAE,IAAI;EACnB,UAAU,EAAE,MAAM,GAsBrB;EA9BD,AAUI,QAVI,CAUJ,CAAC,CAAC;IACD,eAAe,EAAE,IAAI;IACrB,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,eAAe,GAC7B;EAdF,AAgBC,QAhBO,CAgBP,EAAE,CAAC;IACC,OAAO,EAAE,QAAQ,GAIjB;IArBL,AAkBK,QAlBG,CAgBP,EAAE,CAEE,YAAY,CAAA;MACX,KAAK,EAAE,OAAO,GACd;EApBN,AAuBC,QAvBO,CAuBP,KAAK,CAAC;IACF,WAAW,EAAE,IAAI,GACpB;EAzBF,AA2BC,QA3BO,CA2BP,MAAM,CAAC;IACN,KAAK,EAAE,kBAAkB,GACzB;;AAGF,AAEC,SAFQ,CAER,GAAG,CAAC;EACA,SAAS,EAAE,IAAI;EACf,YAAY,EAAE,IAAI,GAClB"
99 }
public/css/style.scss
....@@ -69,7 +69,7 @@
6969 }
7070
7171 .error {
72
- color: #ff5f1f;
72
+ color: #ff5f1f !important;
7373 }
7474 }
7575
routes/index.js
....@@ -100,6 +100,16 @@
100100 util.clearToken(req, res);
101101 });
102102
103
+router.get('/api-test', function(req, res){
104
+ Modules.find({}).then(async function (modules) {
105
+ const param = util.initParam();
106
+ param.modules = await Modules.find({}).exec();
107
+ res.render('permission-test', param);
108
+ }).catch(err => {
109
+ util.reportError(err, res);
110
+ });
111
+});
112
+
103113 // import web router
104114 router.use('/segment', require('./segment'));
105115 router.use('/taxonomy', require('./taxonomy'));