From 4946b7c6646d81ec07be075ef890e33723b7be8f Mon Sep 17 00:00:00 2001
From: JOE <[email protected]>
Date: Fri, 26 Oct 2018 15:28:02 +0900
Subject: [PATCH] add api test page

---
 public/css/style.css     |    2 +-
 public/css/style.scss    |    2 +-
 public/css/style.css.map |    2 +-
 routes/index.js          |   10 ++++++++++
 4 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/public/css/style.css b/public/css/style.css
index 5bc2b3e..11397cf 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -53,7 +53,7 @@
   .content label {
     line-height: 30px; }
   .content .error {
-    color: #ff5f1f; }
+    color: #ff5f1f !important; }
 
 .sub-link div {
   font-size: 11px;
diff --git a/public/css/style.css.map b/public/css/style.css.map
index 972d348..4843491 100644
--- a/public/css/style.css.map
+++ b/public/css/style.css.map
@@ -5,5 +5,5 @@
 		"style.scss"
 	],
 	"names": [],
-	"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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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,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"
 }
\ No newline at end of file
diff --git a/public/css/style.scss b/public/css/style.scss
index e3eeeee..7a906ae 100644
--- a/public/css/style.scss
+++ b/public/css/style.scss
@@ -69,7 +69,7 @@
 	}
 
 	.error {
-		color: #ff5f1f;
+		color: #ff5f1f !important;
 	}	
 }
 
diff --git a/routes/index.js b/routes/index.js
index d6fb28b..0c8bf44 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -100,6 +100,16 @@
 	util.clearToken(req, res);
 });
 
+router.get('/api-test', function(req, res){
+	Modules.find({}).then(async function (modules) {
+		const param = util.initParam();
+		param.modules = await Modules.find({}).exec();
+		res.render('permission-test', param);
+ 	}).catch(err => {
+		util.reportError(err, res);
+	});
+});
+
 // import web router
 router.use('/segment', require('./segment'));
 router.use('/taxonomy', require('./taxonomy'));

--
Gitblit v1.6.2