Open platform to collect and prioritize feedback
add 404 and 500 pages
goenning50a3d248a185
diff --git a/.cover/cover.out b/.cover/cover.outnew file mode 100644index 000000000..a1e0311b6--- /dev/null+++ b/.cover/cover.out@@ -0,0 +1,146 @@+mode: count+github.com/WeCanHearYou/wchy/app/handler.go:17.88,19.2 1 1+github.com/WeCanHearYou/wchy/app/handler.go:21.47,22.36 1 1+github.com/WeCanHearYou/wchy/app/handler.go:22.36,31.3 1 1+github.com/WeCanHearYou/wchy/app/renderer.go:26.56,31.18 4 1+github.com/WeCanHearYou/wchy/app/renderer.go:35.2,37.17 2 1+github.com/WeCanHearYou/wchy/app/renderer.go:31.18,33.3 1 1+github.com/WeCanHearYou/wchy/app/renderer.go:41.41,43.16 2 1+github.com/WeCanHearYou/wchy/app/renderer.go:47.2,47.25 1 1+github.com/WeCanHearYou/wchy/app/renderer.go:43.16,45.3 1 0+github.com/WeCanHearYou/wchy/app/renderer.go:51.97,52.25 1 0+github.com/WeCanHearYou/wchy/app/renderer.go:56.2,57.9 2 0+github.com/WeCanHearYou/wchy/app/renderer.go:61.2,62.28 2 0+github.com/WeCanHearYou/wchy/app/renderer.go:67.2,71.8 4 0+github.com/WeCanHearYou/wchy/app/renderer.go:75.2,77.27 2 0+github.com/WeCanHearYou/wchy/app/renderer.go:52.25,54.3 1 0+github.com/WeCanHearYou/wchy/app/renderer.go:57.9,58.60 1 0+github.com/WeCanHearYou/wchy/app/renderer.go:62.28,64.3 1 0+github.com/WeCanHearYou/wchy/app/renderer.go:71.8,74.3 2 0+github.com/WeCanHearYou/wchy/app/renderer.go:80.36,84.2 3 0+github.com/WeCanHearYou/wchy/app/router.go:31.44,32.45 1 0+github.com/WeCanHearYou/wchy/app/router.go:32.45,35.3 2 0+github.com/WeCanHearYou/wchy/app/router.go:35.3,38.3 2 0+github.com/WeCanHearYou/wchy/app/router.go:41.33,45.24 3 0+github.com/WeCanHearYou/wchy/app/router.go:51.2,51.15 1 0+github.com/WeCanHearYou/wchy/app/router.go:45.24,47.3 1 0+github.com/WeCanHearYou/wchy/app/router.go:47.3,49.3 1 0+github.com/WeCanHearYou/wchy/app/router.go:55.50,67.2 9 0+github.com/WeCanHearYou/wchy/app/router.go:74.2,75.2 2 0+github.com/WeCanHearYou/wchy/app/router.go:85.2,85.15 1 0+github.com/WeCanHearYou/wchy/app/router.go:67.2,72.3 4 0+github.com/WeCanHearYou/wchy/app/router.go:75.2,83.3 6 0+github.com/WeCanHearYou/wchy/feedback/handler.go:13.54,15.2 1 1+github.com/WeCanHearYou/wchy/feedback/handler.go:17.47,18.36 1 1+github.com/WeCanHearYou/wchy/feedback/handler.go:18.36,25.3 3 1+github.com/WeCanHearYou/wchy/identity/handler.go:24.78,26.2 1 1+github.com/WeCanHearYou/wchy/identity/handler.go:29.67,30.36 1 0+github.com/WeCanHearYou/wchy/identity/handler.go:30.36,37.57 5 0+github.com/WeCanHearYou/wchy/identity/handler.go:44.3,45.17 2 0+github.com/WeCanHearYou/wchy/identity/handler.go:50.3,51.17 2 0+github.com/WeCanHearYou/wchy/identity/handler.go:73.3,80.46 3 0+github.com/WeCanHearYou/wchy/identity/handler.go:85.3,88.72 4 0+github.com/WeCanHearYou/wchy/identity/handler.go:37.57,40.4 2 0+github.com/WeCanHearYou/wchy/identity/handler.go:45.17,48.4 2 0+github.com/WeCanHearYou/wchy/identity/handler.go:51.17,52.26 1 0+github.com/WeCanHearYou/wchy/identity/handler.go:52.26,65.19 3 0+github.com/WeCanHearYou/wchy/identity/handler.go:65.19,67.6 1 0+github.com/WeCanHearYou/wchy/identity/handler.go:68.5,70.5 1 0+github.com/WeCanHearYou/wchy/identity/handler.go:80.46,83.4 2 0+github.com/WeCanHearYou/wchy/identity/handler.go:93.64,94.36 1 1+github.com/WeCanHearYou/wchy/identity/handler.go:94.36,97.3 2 1+github.com/WeCanHearYou/wchy/identity/handler.go:101.50,102.36 1 0+github.com/WeCanHearYou/wchy/identity/handler.go:102.36,109.3 2 0+github.com/WeCanHearYou/wchy/identity/jwt.go:19.49,22.2 2 5+github.com/WeCanHearYou/wchy/identity/jwt.go:25.48,27.94 2 2+github.com/WeCanHearYou/wchy/identity/jwt.go:31.2,31.34 1 2+github.com/WeCanHearYou/wchy/identity/jwt.go:35.2,35.17 1 0+github.com/WeCanHearYou/wchy/identity/jwt.go:27.94,29.3 1 2+github.com/WeCanHearYou/wchy/identity/jwt.go:31.34,33.3 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:13.67,14.54 1 6+github.com/WeCanHearYou/wchy/identity/middleware.go:14.54,15.37 1 6+github.com/WeCanHearYou/wchy/identity/middleware.go:15.37,18.18 3 6+github.com/WeCanHearYou/wchy/identity/middleware.go:23.4,24.43 2 1+github.com/WeCanHearYou/wchy/identity/middleware.go:18.18,21.5 2 5+github.com/WeCanHearYou/wchy/identity/middleware.go:30.38,31.54 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:31.54,32.37 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:32.37,34.51 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:42.4,42.18 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:34.51,35.56 1 1+github.com/WeCanHearYou/wchy/identity/middleware.go:35.56,37.6 1 1+github.com/WeCanHearYou/wchy/identity/middleware.go:37.6,39.6 1 0+github.com/WeCanHearYou/wchy/identity/middleware.go:48.38,49.54 1 3+github.com/WeCanHearYou/wchy/identity/middleware.go:49.54,50.37 1 3+github.com/WeCanHearYou/wchy/identity/middleware.go:50.37,55.17 3 3+github.com/WeCanHearYou/wchy/identity/middleware.go:78.4,78.18 1 1+github.com/WeCanHearYou/wchy/identity/middleware.go:55.17,63.31 3 2+github.com/WeCanHearYou/wchy/identity/middleware.go:67.5,71.26 4 2+github.com/WeCanHearYou/wchy/identity/middleware.go:75.5,75.57 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:63.31,65.6 1 0+github.com/WeCanHearYou/wchy/identity/middleware.go:71.26,73.6 1 1+github.com/WeCanHearYou/wchy/identity/middleware.go:84.54,85.54 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:85.54,86.37 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:86.37,89.34 2 2+github.com/WeCanHearYou/wchy/identity/middleware.go:94.4,94.18 1 1+github.com/WeCanHearYou/wchy/identity/middleware.go:89.34,92.5 2 1+github.com/WeCanHearYou/wchy/identity/middleware.go:99.40,101.17 2 6+github.com/WeCanHearYou/wchy/identity/middleware.go:104.2,104.25 1 3+github.com/WeCanHearYou/wchy/identity/middleware.go:101.17,103.3 1 3+github.com/WeCanHearYou/wchy/identity/oauth.go:34.49,36.5 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:46.49,48.5 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:63.45,66.16 3 0+github.com/WeCanHearYou/wchy/identity/oauth.go:70.2,71.16 2 0+github.com/WeCanHearYou/wchy/identity/oauth.go:75.2,75.33 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:66.16,68.3 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:71.16,73.3 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:95.79,107.2 10 0+github.com/WeCanHearYou/wchy/identity/oauth.go:110.95,113.16 3 0+github.com/WeCanHearYou/wchy/identity/oauth.go:117.2,118.71 2 0+github.com/WeCanHearYou/wchy/identity/oauth.go:122.2,122.21 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:113.16,115.3 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:118.71,120.3 1 0+github.com/WeCanHearYou/wchy/postgres/app.go:11.55,13.16 2 2+github.com/WeCanHearYou/wchy/postgres/app.go:17.2,17.13 1 1+github.com/WeCanHearYou/wchy/postgres/app.go:13.16,15.3 1 1+github.com/WeCanHearYou/wchy/postgres/feedback.go:15.73,17.16 2 2+github.com/WeCanHearYou/wchy/postgres/feedback.go:21.2,22.18 2 1+github.com/WeCanHearYou/wchy/postgres/feedback.go:28.2,28.19 1 1+github.com/WeCanHearYou/wchy/postgres/feedback.go:17.16,19.3 1 1+github.com/WeCanHearYou/wchy/postgres/feedback.go:22.18,26.3 3 2+github.com/WeCanHearYou/wchy/postgres/identity.go:17.73,21.68 3 2+github.com/WeCanHearYou/wchy/postgres/identity.go:25.2,25.18 1 1+github.com/WeCanHearYou/wchy/postgres/identity.go:21.68,23.3 1 1+github.com/WeCanHearYou/wchy/postgres/identity.go:29.60,31.16 2 2+github.com/WeCanHearYou/wchy/postgres/identity.go:35.2,35.137 1 2+github.com/WeCanHearYou/wchy/postgres/identity.go:40.2,40.42 1 2+github.com/WeCanHearYou/wchy/postgres/identity.go:47.2,47.20 1 2+github.com/WeCanHearYou/wchy/postgres/identity.go:31.16,33.3 1 0+github.com/WeCanHearYou/wchy/postgres/identity.go:35.137,38.3 2 0+github.com/WeCanHearYou/wchy/postgres/identity.go:40.42,41.157 1 3+github.com/WeCanHearYou/wchy/postgres/identity.go:41.157,44.4 2 0+github.com/WeCanHearYou/wchy/postgres/identity.go:56.79,61.16 4 3+github.com/WeCanHearYou/wchy/postgres/identity.go:65.2,66.20 2 2+github.com/WeCanHearYou/wchy/postgres/identity.go:61.16,63.3 1 1+github.com/WeCanHearYou/wchy/postgres/identity.go:69.45,70.50 1 3+github.com/WeCanHearYou/wchy/postgres/identity.go:73.2,73.15 1 2+github.com/WeCanHearYou/wchy/postgres/identity.go:70.50,72.3 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:8.63,10.17 2 2+github.com/WeCanHearYou/wchy/toolbox/env/env.go:13.2,13.14 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:10.17,12.3 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:17.34,19.17 2 0+github.com/WeCanHearYou/wchy/toolbox/env/env.go:22.2,22.14 1 0+github.com/WeCanHearYou/wchy/toolbox/env/env.go:19.17,20.76 1 0+github.com/WeCanHearYou/wchy/toolbox/env/env.go:26.32,28.13 2 5+github.com/WeCanHearYou/wchy/toolbox/env/env.go:36.2,36.25 1 2+github.com/WeCanHearYou/wchy/toolbox/env/env.go:29.2,30.31 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:31.2,32.30 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:33.2,34.34 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:41.23,43.13 2 10+github.com/WeCanHearYou/wchy/toolbox/env/env.go:51.2,51.22 1 4+github.com/WeCanHearYou/wchy/toolbox/env/env.go:44.2,45.16 1 2+github.com/WeCanHearYou/wchy/toolbox/env/env.go:46.2,47.19 1 2+github.com/WeCanHearYou/wchy/toolbox/env/env.go:48.2,49.22 1 2+github.com/WeCanHearYou/wchy/toolbox/env/env.go:55.26,57.2 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:60.23,62.2 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:65.20,67.2 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:70.27,72.2 1 2diff --git a/.cover/github.com-WeCanHearYou-wchy-app.cover b/.cover/github.com-WeCanHearYou-wchy-app.covernew file mode 100644index 000000000..a67573e81--- /dev/null+++ b/.cover/github.com-WeCanHearYou-wchy-app.cover@@ -0,0 +1,32 @@+mode: count+github.com/WeCanHearYou/wchy/app/handler.go:17.88,19.2 1 1+github.com/WeCanHearYou/wchy/app/handler.go:21.47,22.36 1 1+github.com/WeCanHearYou/wchy/app/handler.go:22.36,31.3 1 1+github.com/WeCanHearYou/wchy/app/renderer.go:26.56,31.18 4 1+github.com/WeCanHearYou/wchy/app/renderer.go:35.2,37.17 2 1+github.com/WeCanHearYou/wchy/app/renderer.go:31.18,33.3 1 1+github.com/WeCanHearYou/wchy/app/renderer.go:41.41,43.16 2 1+github.com/WeCanHearYou/wchy/app/renderer.go:47.2,47.25 1 1+github.com/WeCanHearYou/wchy/app/renderer.go:43.16,45.3 1 0+github.com/WeCanHearYou/wchy/app/renderer.go:51.97,52.25 1 0+github.com/WeCanHearYou/wchy/app/renderer.go:56.2,57.9 2 0+github.com/WeCanHearYou/wchy/app/renderer.go:61.2,62.28 2 0+github.com/WeCanHearYou/wchy/app/renderer.go:67.2,71.8 4 0+github.com/WeCanHearYou/wchy/app/renderer.go:75.2,77.27 2 0+github.com/WeCanHearYou/wchy/app/renderer.go:52.25,54.3 1 0+github.com/WeCanHearYou/wchy/app/renderer.go:57.9,58.60 1 0+github.com/WeCanHearYou/wchy/app/renderer.go:62.28,64.3 1 0+github.com/WeCanHearYou/wchy/app/renderer.go:71.8,74.3 2 0+github.com/WeCanHearYou/wchy/app/renderer.go:80.36,84.2 3 0+github.com/WeCanHearYou/wchy/app/router.go:31.44,32.45 1 0+github.com/WeCanHearYou/wchy/app/router.go:32.45,35.3 2 0+github.com/WeCanHearYou/wchy/app/router.go:35.3,38.3 2 0+github.com/WeCanHearYou/wchy/app/router.go:41.33,45.24 3 0+github.com/WeCanHearYou/wchy/app/router.go:51.2,51.15 1 0+github.com/WeCanHearYou/wchy/app/router.go:45.24,47.3 1 0+github.com/WeCanHearYou/wchy/app/router.go:47.3,49.3 1 0+github.com/WeCanHearYou/wchy/app/router.go:55.50,67.2 9 0+github.com/WeCanHearYou/wchy/app/router.go:74.2,75.2 2 0+github.com/WeCanHearYou/wchy/app/router.go:85.2,85.15 1 0+github.com/WeCanHearYou/wchy/app/router.go:67.2,72.3 4 0+github.com/WeCanHearYou/wchy/app/router.go:75.2,83.3 6 0diff --git a/.cover/github.com-WeCanHearYou-wchy-feedback.cover b/.cover/github.com-WeCanHearYou-wchy-feedback.covernew file mode 100644index 000000000..f7cc4e53a--- /dev/null+++ b/.cover/github.com-WeCanHearYou-wchy-feedback.cover@@ -0,0 +1,4 @@+mode: count+github.com/WeCanHearYou/wchy/feedback/handler.go:13.54,15.2 1 1+github.com/WeCanHearYou/wchy/feedback/handler.go:17.47,18.36 1 1+github.com/WeCanHearYou/wchy/feedback/handler.go:18.36,25.3 3 1diff --git a/.cover/github.com-WeCanHearYou-wchy-identity.cover b/.cover/github.com-WeCanHearYou-wchy-identity.covernew file mode 100644index 000000000..06cf830b3--- /dev/null+++ b/.cover/github.com-WeCanHearYou-wchy-identity.cover@@ -0,0 +1,67 @@+mode: count+github.com/WeCanHearYou/wchy/identity/handler.go:24.78,26.2 1 1+github.com/WeCanHearYou/wchy/identity/handler.go:29.67,30.36 1 0+github.com/WeCanHearYou/wchy/identity/handler.go:30.36,37.57 5 0+github.com/WeCanHearYou/wchy/identity/handler.go:44.3,45.17 2 0+github.com/WeCanHearYou/wchy/identity/handler.go:50.3,51.17 2 0+github.com/WeCanHearYou/wchy/identity/handler.go:73.3,80.46 3 0+github.com/WeCanHearYou/wchy/identity/handler.go:85.3,88.72 4 0+github.com/WeCanHearYou/wchy/identity/handler.go:37.57,40.4 2 0+github.com/WeCanHearYou/wchy/identity/handler.go:45.17,48.4 2 0+github.com/WeCanHearYou/wchy/identity/handler.go:51.17,52.26 1 0+github.com/WeCanHearYou/wchy/identity/handler.go:52.26,65.19 3 0+github.com/WeCanHearYou/wchy/identity/handler.go:65.19,67.6 1 0+github.com/WeCanHearYou/wchy/identity/handler.go:68.5,70.5 1 0+github.com/WeCanHearYou/wchy/identity/handler.go:80.46,83.4 2 0+github.com/WeCanHearYou/wchy/identity/handler.go:93.64,94.36 1 1+github.com/WeCanHearYou/wchy/identity/handler.go:94.36,97.3 2 1+github.com/WeCanHearYou/wchy/identity/handler.go:101.50,102.36 1 0+github.com/WeCanHearYou/wchy/identity/handler.go:102.36,109.3 2 0+github.com/WeCanHearYou/wchy/identity/jwt.go:19.49,22.2 2 5+github.com/WeCanHearYou/wchy/identity/jwt.go:25.48,27.94 2 2+github.com/WeCanHearYou/wchy/identity/jwt.go:31.2,31.34 1 2+github.com/WeCanHearYou/wchy/identity/jwt.go:35.2,35.17 1 0+github.com/WeCanHearYou/wchy/identity/jwt.go:27.94,29.3 1 2+github.com/WeCanHearYou/wchy/identity/jwt.go:31.34,33.3 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:13.67,14.54 1 6+github.com/WeCanHearYou/wchy/identity/middleware.go:14.54,15.37 1 6+github.com/WeCanHearYou/wchy/identity/middleware.go:15.37,18.18 3 6+github.com/WeCanHearYou/wchy/identity/middleware.go:23.4,24.43 2 1+github.com/WeCanHearYou/wchy/identity/middleware.go:18.18,21.5 2 5+github.com/WeCanHearYou/wchy/identity/middleware.go:30.38,31.54 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:31.54,32.37 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:32.37,34.51 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:42.4,42.18 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:34.51,35.56 1 1+github.com/WeCanHearYou/wchy/identity/middleware.go:35.56,37.6 1 1+github.com/WeCanHearYou/wchy/identity/middleware.go:37.6,39.6 1 0+github.com/WeCanHearYou/wchy/identity/middleware.go:48.38,49.54 1 3+github.com/WeCanHearYou/wchy/identity/middleware.go:49.54,50.37 1 3+github.com/WeCanHearYou/wchy/identity/middleware.go:50.37,55.17 3 3+github.com/WeCanHearYou/wchy/identity/middleware.go:78.4,78.18 1 1+github.com/WeCanHearYou/wchy/identity/middleware.go:55.17,63.31 3 2+github.com/WeCanHearYou/wchy/identity/middleware.go:67.5,71.26 4 2+github.com/WeCanHearYou/wchy/identity/middleware.go:75.5,75.57 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:63.31,65.6 1 0+github.com/WeCanHearYou/wchy/identity/middleware.go:71.26,73.6 1 1+github.com/WeCanHearYou/wchy/identity/middleware.go:84.54,85.54 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:85.54,86.37 1 2+github.com/WeCanHearYou/wchy/identity/middleware.go:86.37,89.34 2 2+github.com/WeCanHearYou/wchy/identity/middleware.go:94.4,94.18 1 1+github.com/WeCanHearYou/wchy/identity/middleware.go:89.34,92.5 2 1+github.com/WeCanHearYou/wchy/identity/middleware.go:99.40,101.17 2 6+github.com/WeCanHearYou/wchy/identity/middleware.go:104.2,104.25 1 3+github.com/WeCanHearYou/wchy/identity/middleware.go:101.17,103.3 1 3+github.com/WeCanHearYou/wchy/identity/oauth.go:34.49,36.5 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:46.49,48.5 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:63.45,66.16 3 0+github.com/WeCanHearYou/wchy/identity/oauth.go:70.2,71.16 2 0+github.com/WeCanHearYou/wchy/identity/oauth.go:75.2,75.33 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:66.16,68.3 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:71.16,73.3 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:95.79,107.2 10 0+github.com/WeCanHearYou/wchy/identity/oauth.go:110.95,113.16 3 0+github.com/WeCanHearYou/wchy/identity/oauth.go:117.2,118.71 2 0+github.com/WeCanHearYou/wchy/identity/oauth.go:122.2,122.21 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:113.16,115.3 1 0+github.com/WeCanHearYou/wchy/identity/oauth.go:118.71,120.3 1 0diff --git a/.cover/github.com-WeCanHearYou-wchy-postgres.cover b/.cover/github.com-WeCanHearYou-wchy-postgres.covernew file mode 100644index 000000000..52fbba3c6--- /dev/null+++ b/.cover/github.com-WeCanHearYou-wchy-postgres.cover@@ -0,0 +1,26 @@+mode: count+github.com/WeCanHearYou/wchy/postgres/app.go:11.55,13.16 2 2+github.com/WeCanHearYou/wchy/postgres/app.go:17.2,17.13 1 1+github.com/WeCanHearYou/wchy/postgres/app.go:13.16,15.3 1 1+github.com/WeCanHearYou/wchy/postgres/feedback.go:15.73,17.16 2 2+github.com/WeCanHearYou/wchy/postgres/feedback.go:21.2,22.18 2 1+github.com/WeCanHearYou/wchy/postgres/feedback.go:28.2,28.19 1 1+github.com/WeCanHearYou/wchy/postgres/feedback.go:17.16,19.3 1 1+github.com/WeCanHearYou/wchy/postgres/feedback.go:22.18,26.3 3 2+github.com/WeCanHearYou/wchy/postgres/identity.go:17.73,21.68 3 2+github.com/WeCanHearYou/wchy/postgres/identity.go:25.2,25.18 1 1+github.com/WeCanHearYou/wchy/postgres/identity.go:21.68,23.3 1 1+github.com/WeCanHearYou/wchy/postgres/identity.go:29.60,31.16 2 2+github.com/WeCanHearYou/wchy/postgres/identity.go:35.2,35.137 1 2+github.com/WeCanHearYou/wchy/postgres/identity.go:40.2,40.42 1 2+github.com/WeCanHearYou/wchy/postgres/identity.go:47.2,47.20 1 2+github.com/WeCanHearYou/wchy/postgres/identity.go:31.16,33.3 1 0+github.com/WeCanHearYou/wchy/postgres/identity.go:35.137,38.3 2 0+github.com/WeCanHearYou/wchy/postgres/identity.go:40.42,41.157 1 3+github.com/WeCanHearYou/wchy/postgres/identity.go:41.157,44.4 2 0+github.com/WeCanHearYou/wchy/postgres/identity.go:56.79,61.16 4 3+github.com/WeCanHearYou/wchy/postgres/identity.go:65.2,66.20 2 2+github.com/WeCanHearYou/wchy/postgres/identity.go:61.16,63.3 1 1+github.com/WeCanHearYou/wchy/postgres/identity.go:69.45,70.50 1 3+github.com/WeCanHearYou/wchy/postgres/identity.go:73.2,73.15 1 2+github.com/WeCanHearYou/wchy/postgres/identity.go:70.50,72.3 1 1diff --git a/.cover/github.com-WeCanHearYou-wchy-toolbox-env.cover b/.cover/github.com-WeCanHearYou-wchy-toolbox-env.covernew file mode 100644index 000000000..08cd31fe8--- /dev/null+++ b/.cover/github.com-WeCanHearYou-wchy-toolbox-env.cover@@ -0,0 +1,21 @@+mode: count+github.com/WeCanHearYou/wchy/toolbox/env/env.go:8.63,10.17 2 2+github.com/WeCanHearYou/wchy/toolbox/env/env.go:13.2,13.14 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:10.17,12.3 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:17.34,19.17 2 0+github.com/WeCanHearYou/wchy/toolbox/env/env.go:22.2,22.14 1 0+github.com/WeCanHearYou/wchy/toolbox/env/env.go:19.17,20.76 1 0+github.com/WeCanHearYou/wchy/toolbox/env/env.go:26.32,28.13 2 5+github.com/WeCanHearYou/wchy/toolbox/env/env.go:36.2,36.25 1 2+github.com/WeCanHearYou/wchy/toolbox/env/env.go:29.2,30.31 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:31.2,32.30 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:33.2,34.34 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:41.23,43.13 2 10+github.com/WeCanHearYou/wchy/toolbox/env/env.go:51.2,51.22 1 4+github.com/WeCanHearYou/wchy/toolbox/env/env.go:44.2,45.16 1 2+github.com/WeCanHearYou/wchy/toolbox/env/env.go:46.2,47.19 1 2+github.com/WeCanHearYou/wchy/toolbox/env/env.go:48.2,49.22 1 2+github.com/WeCanHearYou/wchy/toolbox/env/env.go:55.26,57.2 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:60.23,62.2 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:65.20,67.2 1 1+github.com/WeCanHearYou/wchy/toolbox/env/env.go:70.27,72.2 1 2diff --git a/app/renderer.go b/app/renderer.goindex cedd682cc..64bf3f234 100644--- a/app/renderer.go+++ b/app/renderer.go@@ -32,30 +32,34 @@ func NewHTMLRenderer(logger echo.Logger) *HTMLRenderer {path = os.Getenv("GOPATH") + "/src/github.com/WeCanHearYou/wchy/" + path}+ //TODO: load all templates automaticallyrenderer.add("index.html")+ renderer.add("404.html")+ renderer.add("500.html")return renderer}//Render a template based on parameters-func (r *HTMLRenderer) add(name string) {+func (r *HTMLRenderer) add(name string) *template.Template {tpl, err := template.ParseFiles(path+"base.html", path+name)if err != nil {r.logger.Error(err)}r.templates[name] = tpl+ return tpl}//Render a template based on parametersfunc (r *HTMLRenderer) Render(w io.Writer, name string, data interface{}, c echo.Context) error {- if env.IsDevelopment() {- r.add(name)- }-tmpl, ok := r.templates[name]if !ok {- panic(fmt.Errorf("The template %s does not exist", name))+ panic(fmt.Errorf("The template '%s' does not exist", name))+ }++ if env.IsDevelopment() {+ tmpl = r.add(name)}protocol := "http://"diff --git a/app/router.go b/app/router.goindex e0cb2b972..1dabc790b 100644--- a/app/router.go+++ b/app/router.go@@ -30,11 +30,10 @@ type WchyServices struct {func errorHandler(e error, c echo.Context) {if strings.Contains(e.Error(), "code=404") {- c.Logger().Debugf("%s not found.", c.Request().URL)- c.NoContent(http.StatusNotFound)+ c.Render(http.StatusNotFound, "404.html", echo.Map{})} else {c.Logger().Error(e)- c.NoContent(http.StatusInternalServerError)+ c.Render(http.StatusInternalServerError, "500.html", echo.Map{})}}diff --git a/app/router_test.go b/app/router_test.goindex dbbfed5d6..7b0a05f4f 100644--- a/app/router_test.go+++ b/app/router_test.go@@ -1,15 +1,16 @@package app_test-/*-TODO: re-enable this test+import (+ "testing"--import . "github.com/onsi/gomega"+ "github.com/WeCanHearYou/wchy/app"+ . "github.com/onsi/gomega"+)func TestRouter(t *testing.T) {RegisterTestingT(t)- r := router.GetMainEngine(nil)+ ctx := &app.WchyServices{}+ r := app.GetMainEngine(ctx)Expect(r).ToNot(BeNil())}-*/diff --git a/identity/handler.go b/identity/handler.goindex 87490e30a..a34b10af9 100644--- a/identity/handler.go+++ b/identity/handler.go@@ -36,7 +36,7 @@ func (h OAuthHandlers) Callback(provider string) echo.HandlerFunc {if redirectURL, err = url.Parse(redirect); err != nil {c.Logger().Errorf("Could not parse url %s", redirect)- return c.Redirect(http.StatusTemporaryRedirect, redirect) //TODO: redirect to some error page+ return c.Render(http.StatusInternalServerError, "500.html", echo.Map{})}//TODO: Check if code is empty (or other querystring parameter)@@ -44,7 +44,7 @@ func (h OAuthHandlers) Callback(provider string) echo.HandlerFunc {oauthUser, err := h.oauthService.GetProfile(provider, code)if err != nil {c.Logger().Error(err)- return c.Redirect(http.StatusTemporaryRedirect, redirect) //TODO: redirect to some error page+ return c.Render(http.StatusInternalServerError, "500.html", echo.Map{})}user, err := h.userService.GetByEmail(oauthUser.Email)@@ -79,7 +79,7 @@ func (h OAuthHandlers) Callback(provider string) echo.HandlerFunc {var token stringif token, err = Encode(claims); err != nil {c.Logger().Errorf("Encoding claims failed with %s", err)- return c.Redirect(http.StatusTemporaryRedirect, redirect) //TODO: redirect to some error page+ return c.Render(http.StatusInternalServerError, "500.html", echo.Map{})}var query = redirectURL.Query()diff --git a/identity/middleware.go b/identity/middleware.goindex 40daf7f86..99de9bf10 100644--- a/identity/middleware.go+++ b/identity/middleware.go@@ -1,7 +1,6 @@package identityimport (- "fmt""net/http""net/url""strings"@@ -20,7 +19,7 @@ func MultiTenant(tenantService TenantService) echo.MiddlewareFunc {return next(c)}- fmt.Printf("Tenant not found for %s.\n", hostname)+ c.Logger().Infof("Tenant not found for '%s'.", hostname)return c.NoContent(http.StatusNotFound)}}diff --git a/identity/middleware_test.go b/identity/middleware_test.goindex d75a8c32c..a0620d4bf 100644--- a/identity/middleware_test.go+++ b/identity/middleware_test.go@@ -64,7 +64,6 @@ func TestMultiTenant(t *testing.T) {Expect(rec.Code).To(Equal(200))Expect(rec.Body.String()).To(Equal(testCase.tenant.Name))-}}}@@ -78,8 +77,8 @@ func TestMultiTenant_UnknownDomain(t *testing.T) {c := e.NewContext(req, rec)c.Request().Host = "somedomain.com"- cors := identity.MultiTenant(&mockTenantService{})- cors(echo.HandlerFunc(func(c echo.Context) error {+ mw := identity.MultiTenant(&mockTenantService{})+ mw(echo.HandlerFunc(func(c echo.Context) error {return c.String(http.StatusOK, c.Get("Tenant").(*identity.Tenant).Name)}))(c)diff --git a/main.go b/main.goindex 1bf9fda92..1c284dcae 100644--- a/main.go+++ b/main.go@@ -14,10 +14,12 @@ import (var buildtime string-func main() {+func init() {fmt.Printf("Application is starting...\n")fmt.Printf("GO_ENV: %s\n", env.Current())+}+func main() {db, err := sql.Open("postgres", env.MustGet("DATABASE_URL"))if err != nil {panic(err)diff --git a/views/404.html b/views/404.htmlnew file mode 100644index 000000000..15a467f9f--- /dev/null+++ b/views/404.html@@ -0,0 +1,7 @@+{{define "title"}}+ 404: Page not found+{{end}}++{{define "content"}}+ <h1>404: Page not found</h1>+{{end}}diff --git a/views/500.html b/views/500.htmlnew file mode 100644index 000000000..586857bbd--- /dev/null+++ b/views/500.html@@ -0,0 +1,7 @@+{{define "title"}}+ 404: Page not found+{{end}}++{{define "content"}}+ <h1>500: Oops, something unexpected happened... :(</h1>+{{end}}diff --git a/views/base.html b/views/base.htmlindex 8e18d5221..aab73e7ab 100644--- a/views/base.html+++ b/views/base.html@@ -12,7 +12,60 @@<title>{{template "title" .}}</title></head><body>- {{template "content" .}}+ <div class="ui menu">+ <div class="ui container">+ <div class="header item">+ {{ .Tenant.Name }}+ </div>+ {{if not .Claims }}+ <a class="item right signin">+ <img class="ui avatar image" src="https://www.gravatar.com/avatar/">+ Sign in {{ .Claims }}+ <i class="dropdown icon"></i>+ </a>+ {{ else }}+ <a class="item right signin">+ <img class="ui avatar image" src="https://www.gravatar.com/avatar/{{ .Gravatar }}">+ {{ .Claims.UserName }}+ <i class="dropdown icon"></i>+ </a>+ {{ end }}+ </div>+ </div>++ {{if not .Claims }}+ <div id="user-popup" class="ui popup top left transition hidden">+ <div class="ui list">+ <div class="item">+ <a href="{{ .AuthEndpoint }}/oauth/facebook?redirect={{ .CurrentUrl }}" class="ui fluid facebook button">+ <i class="facebook icon"></i>+ Sign in with Facebook+ </a>+ </div>+ <div class="item">+ <a href="{{ .AuthEndpoint }}/oauth/google?redirect={{ .CurrentUrl }}" class="ui fluid google plus button">+ <i class="google icon"></i>+ Sign in with Google+ </a>+ </div>+ </div>+ </div>+ {{ else }}+ <div id="user-popup" class="ui popup top left transition hidden">+ <div class="ui">+ <div class="item">+ <a href="/logout?redirect=/">+ Sign out+ </a>+ </div>+ </div>+ </div>+ {{ end }}++ <div class="ui container">+ {{template "content" .}}+ </div>+<div id="footer" class="ui inverted vertical footer segment"><div class="ui center aligned container">diff --git a/views/index.html b/views/index.htmlindex dac6219e6..b7102f50e 100644--- a/views/index.html+++ b/views/index.html@@ -3,56 +3,6 @@{{end}}{{define "content"}}- <div class="ui menu">- <div class="ui container">- <div class="header item">- {{ .Tenant.Name }}- </div>- {{if not .Claims }}- <a class="item right signin">- <img class="ui avatar image" src="https://www.gravatar.com/avatar/">- Sign in {{ .Claims }}- <i class="dropdown icon"></i>- </a>- {{ else }}- <a class="item right signin">- <img class="ui avatar image" src="https://www.gravatar.com/avatar/{{ .Gravatar }}">- {{ .Claims.UserName }}- <i class="dropdown icon"></i>- </a>- {{ end }}- </div>- </div>-- {{if not .Claims }}- <div id="user-popup" class="ui popup top left transition hidden">- <div class="ui list">- <div class="item">- <a href="{{ .AuthEndpoint }}/oauth/facebook?redirect={{ .CurrentUrl }}" class="ui fluid facebook button">- <i class="facebook icon"></i>- Sign in with Facebook- </a>- </div>- <div class="item">- <a href="{{ .AuthEndpoint }}/oauth/google?redirect={{ .CurrentUrl }}" class="ui fluid google plus button">- <i class="google icon"></i>- Sign in with Google- </a>- </div>- </div>- </div>- {{ else }}- <div id="user-popup" class="ui popup top left transition hidden">- <div class="ui">- <div class="item">- <a href="/logout?redirect=/">- Sign out- </a>- </div>- </div>- </div>- {{ end }}-<div class="ui container"><h1 class="ui header">Welcome to our feedback forum</h1></div>