1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

chore: introduce user email addresses (resolve #132)

This commit is contained in:
Ferdinand Mütsch 2021-02-21 13:02:11 +01:00
parent 81d3251856
commit 017530ac4a
11 changed files with 527 additions and 422 deletions

View File

@ -22,11 +22,12 @@ func Test_mysqlConnectionString(t *testing.T) {
Password: "test_password",
Name: "test_name",
Dialect: "mysql",
Charset: "utf8mb4",
MaxConn: 10,
}
assert.Equal(t, fmt.Sprintf(
"%s:%s@tcp(%s:%d)/%s?charset=utf8&parseTime=true&loc=%s&sql_mode=ANSI_QUOTES",
"%s:%s@tcp(%s:%d)/%s?charset=utf8mb4&parseTime=true&loc=%s&sql_mode=ANSI_QUOTES",
c.User,
c.Password,
c.Host,

View File

@ -1,97 +1,20 @@
mode: set
github.com/muety/wakapi/models/heartbeat.go:32.34,34.2 1 1
github.com/muety/wakapi/models/heartbeat.go:36.65,37.28 1 1
github.com/muety/wakapi/models/heartbeat.go:40.2,41.45 2 1
github.com/muety/wakapi/models/heartbeat.go:44.2,45.44 2 1
github.com/muety/wakapi/models/heartbeat.go:48.2,48.42 1 1
github.com/muety/wakapi/models/heartbeat.go:37.28,39.3 1 1
github.com/muety/wakapi/models/heartbeat.go:41.45,43.3 1 0
github.com/muety/wakapi/models/heartbeat.go:45.44,47.3 1 0
github.com/muety/wakapi/models/heartbeat.go:51.50,52.11 1 1
github.com/muety/wakapi/models/heartbeat.go:65.2,65.15 1 1
github.com/muety/wakapi/models/heartbeat.go:69.2,69.12 1 1
github.com/muety/wakapi/models/heartbeat.go:53.22,54.18 1 1
github.com/muety/wakapi/models/heartbeat.go:55.21,56.17 1 1
github.com/muety/wakapi/models/heartbeat.go:57.23,58.19 1 1
github.com/muety/wakapi/models/heartbeat.go:59.17,60.26 1 1
github.com/muety/wakapi/models/heartbeat.go:61.22,62.18 1 1
github.com/muety/wakapi/models/heartbeat.go:65.15,67.3 1 1
github.com/muety/wakapi/models/heartbeat.go:72.37,88.2 1 0
github.com/muety/wakapi/models/heartbeat.go:96.41,98.16 2 0
github.com/muety/wakapi/models/heartbeat.go:101.2,102.10 2 0
github.com/muety/wakapi/models/heartbeat.go:98.16,100.3 1 0
github.com/muety/wakapi/models/heartbeats.go:7.31,9.2 1 0
github.com/muety/wakapi/models/heartbeats.go:11.41,13.2 1 0
github.com/muety/wakapi/models/heartbeats.go:15.36,17.2 1 0
github.com/muety/wakapi/models/heartbeats.go:19.43,22.2 2 0
github.com/muety/wakapi/models/heartbeats.go:24.41,26.18 1 0
github.com/muety/wakapi/models/heartbeats.go:29.2,29.16 1 0
github.com/muety/wakapi/models/heartbeats.go:26.18,28.3 1 0
github.com/muety/wakapi/models/heartbeats.go:32.40,34.18 1 0
github.com/muety/wakapi/models/heartbeats.go:37.2,37.24 1 0
github.com/muety/wakapi/models/heartbeats.go:34.18,36.3 1 0
github.com/muety/wakapi/models/language_mapping.go:11.42,13.2 1 0
github.com/muety/wakapi/models/language_mapping.go:15.51,17.2 1 0
github.com/muety/wakapi/models/language_mapping.go:19.52,21.2 1 0
github.com/muety/wakapi/models/summary.go:68.29,70.2 1 1
github.com/muety/wakapi/models/summary.go:72.37,79.2 6 1
github.com/muety/wakapi/models/summary.go:81.35,83.2 1 1
github.com/muety/wakapi/models/summary.go:85.57,93.2 1 1
github.com/muety/wakapi/models/summary.go:95.64,97.2 1 0
github.com/muety/wakapi/models/summary.go:110.33,115.26 4 1
github.com/muety/wakapi/models/summary.go:122.2,122.37 1 1
github.com/muety/wakapi/models/summary.go:126.2,129.33 2 1
github.com/muety/wakapi/models/summary.go:115.26,116.30 1 1
github.com/muety/wakapi/models/summary.go:116.30,118.4 1 1
github.com/muety/wakapi/models/summary.go:122.37,124.3 1 0
github.com/muety/wakapi/models/summary.go:129.33,135.3 1 1
github.com/muety/wakapi/models/summary.go:138.45,143.30 3 1
github.com/muety/wakapi/models/summary.go:152.2,152.30 1 1
github.com/muety/wakapi/models/summary.go:143.30,144.47 1 1
github.com/muety/wakapi/models/summary.go:144.47,145.32 1 1
github.com/muety/wakapi/models/summary.go:148.4,148.9 1 1
github.com/muety/wakapi/models/summary.go:145.32,147.5 1 1
github.com/muety/wakapi/models/summary.go:155.73,157.55 2 1
github.com/muety/wakapi/models/summary.go:162.2,162.16 1 1
github.com/muety/wakapi/models/summary.go:157.55,158.31 1 1
github.com/muety/wakapi/models/summary.go:158.31,160.4 1 1
github.com/muety/wakapi/models/summary.go:165.88,167.55 2 1
github.com/muety/wakapi/models/summary.go:175.2,175.16 1 1
github.com/muety/wakapi/models/summary.go:167.55,168.31 1 1
github.com/muety/wakapi/models/summary.go:168.31,169.23 1 1
github.com/muety/wakapi/models/summary.go:172.4,172.46 1 1
github.com/muety/wakapi/models/summary.go:169.23,170.13 1 1
github.com/muety/wakapi/models/summary.go:178.70,180.8 2 1
github.com/muety/wakapi/models/summary.go:183.2,183.10 1 1
github.com/muety/wakapi/models/summary.go:180.8,182.3 1 1
github.com/muety/wakapi/models/summary.go:186.71,187.63 1 1
github.com/muety/wakapi/models/summary.go:227.2,233.10 6 1
github.com/muety/wakapi/models/summary.go:187.63,190.45 2 1
github.com/muety/wakapi/models/summary.go:199.3,199.31 1 1
github.com/muety/wakapi/models/summary.go:206.3,206.31 1 1
github.com/muety/wakapi/models/summary.go:223.3,223.16 1 1
github.com/muety/wakapi/models/summary.go:190.45,191.32 1 1
github.com/muety/wakapi/models/summary.go:196.4,196.14 1 1
github.com/muety/wakapi/models/summary.go:191.32,192.24 1 1
github.com/muety/wakapi/models/summary.go:192.24,194.6 1 1
github.com/muety/wakapi/models/summary.go:199.31,201.60 1 1
github.com/muety/wakapi/models/summary.go:201.60,203.5 1 1
github.com/muety/wakapi/models/summary.go:206.31,208.60 1 1
github.com/muety/wakapi/models/summary.go:208.60,209.55 1 1
github.com/muety/wakapi/models/summary.go:209.55,211.6 1 1
github.com/muety/wakapi/models/summary.go:211.11,219.6 1 1
github.com/muety/wakapi/models/summary.go:236.33,238.2 1 1
github.com/muety/wakapi/models/summary.go:240.43,242.2 1 1
github.com/muety/wakapi/models/summary.go:244.38,246.2 1 1
github.com/muety/wakapi/models/user.go:46.43,49.2 1 0
github.com/muety/wakapi/models/user.go:51.33,55.2 1 0
github.com/muety/wakapi/models/user.go:57.45,59.2 1 0
github.com/muety/wakapi/models/user.go:61.45,63.2 1 0
github.com/muety/wakapi/models/alias.go:12.32,14.2 1 0
github.com/muety/wakapi/models/alias.go:16.37,17.35 1 0
github.com/muety/wakapi/models/alias.go:22.2,22.14 1 0
github.com/muety/wakapi/models/alias.go:17.35,18.18 1 0
github.com/muety/wakapi/models/alias.go:18.18,20.4 1 0
github.com/muety/wakapi/models/shared.go:35.52,37.2 1 0
github.com/muety/wakapi/models/shared.go:39.52,42.16 3 0
github.com/muety/wakapi/models/shared.go:45.2,47.12 3 0
github.com/muety/wakapi/models/shared.go:42.16,44.3 1 0
github.com/muety/wakapi/models/shared.go:51.52,57.22 2 0
github.com/muety/wakapi/models/shared.go:73.2,76.12 3 0
github.com/muety/wakapi/models/shared.go:58.14,60.17 2 0
github.com/muety/wakapi/models/shared.go:63.13,65.8 2 0
github.com/muety/wakapi/models/shared.go:66.17,68.8 2 0
github.com/muety/wakapi/models/shared.go:69.10,70.64 1 0
github.com/muety/wakapi/models/shared.go:60.17,62.4 1 0
github.com/muety/wakapi/models/shared.go:79.45,81.2 1 0
github.com/muety/wakapi/models/shared.go:83.51,86.2 2 0
github.com/muety/wakapi/models/shared.go:88.37,91.2 2 0
github.com/muety/wakapi/models/shared.go:93.35,95.2 1 0
github.com/muety/wakapi/models/shared.go:97.34,99.2 1 0
github.com/muety/wakapi/models/filters.go:16.56,17.16 1 0
github.com/muety/wakapi/models/filters.go:29.2,29.19 1 0
github.com/muety/wakapi/models/filters.go:18.22,19.32 1 0
@ -114,34 +37,110 @@ github.com/muety/wakapi/models/interval.go:39.47,40.23 1 0
github.com/muety/wakapi/models/interval.go:45.2,45.14 1 0
github.com/muety/wakapi/models/interval.go:40.23,41.13 1 0
github.com/muety/wakapi/models/interval.go:41.13,43.4 1 0
github.com/muety/wakapi/models/heartbeats.go:7.31,9.2 1 0
github.com/muety/wakapi/models/heartbeats.go:11.41,13.2 1 0
github.com/muety/wakapi/models/heartbeats.go:15.36,17.2 1 0
github.com/muety/wakapi/models/heartbeats.go:19.43,22.2 2 0
github.com/muety/wakapi/models/heartbeats.go:24.41,26.18 1 0
github.com/muety/wakapi/models/heartbeats.go:29.2,29.16 1 0
github.com/muety/wakapi/models/heartbeats.go:26.18,28.3 1 0
github.com/muety/wakapi/models/heartbeats.go:32.40,34.18 1 0
github.com/muety/wakapi/models/heartbeats.go:37.2,37.24 1 0
github.com/muety/wakapi/models/heartbeats.go:34.18,36.3 1 0
github.com/muety/wakapi/models/language_mapping.go:11.42,13.2 1 0
github.com/muety/wakapi/models/language_mapping.go:15.51,17.2 1 0
github.com/muety/wakapi/models/language_mapping.go:19.52,21.2 1 0
github.com/muety/wakapi/models/models.go:3.14,5.2 0 1
github.com/muety/wakapi/models/shared.go:35.52,37.2 1 0
github.com/muety/wakapi/models/shared.go:39.52,42.16 3 0
github.com/muety/wakapi/models/shared.go:45.2,47.12 3 0
github.com/muety/wakapi/models/shared.go:42.16,44.3 1 0
github.com/muety/wakapi/models/shared.go:51.52,57.22 2 0
github.com/muety/wakapi/models/shared.go:73.2,76.12 3 0
github.com/muety/wakapi/models/shared.go:58.14,60.17 2 0
github.com/muety/wakapi/models/shared.go:63.13,65.8 2 0
github.com/muety/wakapi/models/shared.go:66.17,68.8 2 0
github.com/muety/wakapi/models/shared.go:69.10,70.64 1 0
github.com/muety/wakapi/models/shared.go:60.17,62.4 1 0
github.com/muety/wakapi/models/shared.go:79.45,81.2 1 0
github.com/muety/wakapi/models/shared.go:83.51,86.2 2 0
github.com/muety/wakapi/models/shared.go:88.37,91.2 2 0
github.com/muety/wakapi/models/shared.go:93.35,95.2 1 0
github.com/muety/wakapi/models/shared.go:97.34,99.2 1 0
github.com/muety/wakapi/utils/color.go:8.90,10.32 2 0
github.com/muety/wakapi/utils/color.go:15.2,15.15 1 0
github.com/muety/wakapi/utils/color.go:10.32,11.50 1 0
github.com/muety/wakapi/utils/color.go:11.50,13.4 1 0
github.com/muety/wakapi/models/summary.go:69.29,71.2 1 1
github.com/muety/wakapi/models/summary.go:73.37,80.2 6 1
github.com/muety/wakapi/models/summary.go:82.35,84.2 1 1
github.com/muety/wakapi/models/summary.go:86.57,94.2 1 1
github.com/muety/wakapi/models/summary.go:96.64,98.2 1 0
github.com/muety/wakapi/models/summary.go:111.33,116.26 4 1
github.com/muety/wakapi/models/summary.go:123.2,123.37 1 1
github.com/muety/wakapi/models/summary.go:127.2,130.33 2 1
github.com/muety/wakapi/models/summary.go:116.26,117.30 1 1
github.com/muety/wakapi/models/summary.go:117.30,119.4 1 1
github.com/muety/wakapi/models/summary.go:123.37,125.3 1 0
github.com/muety/wakapi/models/summary.go:130.33,136.3 1 1
github.com/muety/wakapi/models/summary.go:139.45,144.30 3 1
github.com/muety/wakapi/models/summary.go:153.2,153.30 1 1
github.com/muety/wakapi/models/summary.go:144.30,145.47 1 1
github.com/muety/wakapi/models/summary.go:145.47,146.32 1 1
github.com/muety/wakapi/models/summary.go:149.4,149.9 1 1
github.com/muety/wakapi/models/summary.go:146.32,148.5 1 1
github.com/muety/wakapi/models/summary.go:156.73,158.55 2 1
github.com/muety/wakapi/models/summary.go:163.2,163.16 1 1
github.com/muety/wakapi/models/summary.go:158.55,159.31 1 1
github.com/muety/wakapi/models/summary.go:159.31,161.4 1 1
github.com/muety/wakapi/models/summary.go:166.88,168.55 2 1
github.com/muety/wakapi/models/summary.go:176.2,176.16 1 1
github.com/muety/wakapi/models/summary.go:168.55,169.31 1 1
github.com/muety/wakapi/models/summary.go:169.31,170.23 1 1
github.com/muety/wakapi/models/summary.go:173.4,173.46 1 1
github.com/muety/wakapi/models/summary.go:170.23,171.13 1 1
github.com/muety/wakapi/models/summary.go:179.70,181.8 2 1
github.com/muety/wakapi/models/summary.go:184.2,184.10 1 1
github.com/muety/wakapi/models/summary.go:181.8,183.3 1 1
github.com/muety/wakapi/models/summary.go:187.71,188.63 1 1
github.com/muety/wakapi/models/summary.go:228.2,234.10 6 1
github.com/muety/wakapi/models/summary.go:188.63,191.45 2 1
github.com/muety/wakapi/models/summary.go:200.3,200.31 1 1
github.com/muety/wakapi/models/summary.go:207.3,207.31 1 1
github.com/muety/wakapi/models/summary.go:224.3,224.16 1 1
github.com/muety/wakapi/models/summary.go:191.45,192.32 1 1
github.com/muety/wakapi/models/summary.go:197.4,197.14 1 1
github.com/muety/wakapi/models/summary.go:192.32,193.24 1 1
github.com/muety/wakapi/models/summary.go:193.24,195.6 1 1
github.com/muety/wakapi/models/summary.go:200.31,202.60 1 1
github.com/muety/wakapi/models/summary.go:202.60,204.5 1 1
github.com/muety/wakapi/models/summary.go:207.31,209.60 1 1
github.com/muety/wakapi/models/summary.go:209.60,210.55 1 1
github.com/muety/wakapi/models/summary.go:210.55,212.6 1 1
github.com/muety/wakapi/models/summary.go:212.11,220.6 1 1
github.com/muety/wakapi/models/summary.go:237.33,239.2 1 1
github.com/muety/wakapi/models/summary.go:241.43,243.2 1 1
github.com/muety/wakapi/models/summary.go:245.38,247.2 1 1
github.com/muety/wakapi/models/user.go:13.13,15.2 1 1
github.com/muety/wakapi/models/user.go:63.43,66.2 1 0
github.com/muety/wakapi/models/user.go:68.33,73.2 1 0
github.com/muety/wakapi/models/user.go:75.45,77.2 1 0
github.com/muety/wakapi/models/user.go:79.45,81.2 1 0
github.com/muety/wakapi/models/user.go:83.39,85.2 1 0
github.com/muety/wakapi/models/alias.go:12.32,14.2 1 0
github.com/muety/wakapi/models/alias.go:16.37,17.35 1 0
github.com/muety/wakapi/models/alias.go:22.2,22.14 1 0
github.com/muety/wakapi/models/alias.go:17.35,18.18 1 0
github.com/muety/wakapi/models/alias.go:18.18,20.4 1 0
github.com/muety/wakapi/models/heartbeat.go:13.13,15.2 1 1
github.com/muety/wakapi/models/heartbeat.go:38.34,40.2 1 1
github.com/muety/wakapi/models/heartbeat.go:42.65,44.45 2 1
github.com/muety/wakapi/models/heartbeat.go:47.2,48.44 2 1
github.com/muety/wakapi/models/heartbeat.go:51.2,51.42 1 1
github.com/muety/wakapi/models/heartbeat.go:44.45,46.3 1 0
github.com/muety/wakapi/models/heartbeat.go:48.44,50.3 1 0
github.com/muety/wakapi/models/heartbeat.go:54.50,55.11 1 1
github.com/muety/wakapi/models/heartbeat.go:68.2,68.15 1 1
github.com/muety/wakapi/models/heartbeat.go:72.2,72.12 1 1
github.com/muety/wakapi/models/heartbeat.go:56.22,57.18 1 1
github.com/muety/wakapi/models/heartbeat.go:58.21,59.17 1 1
github.com/muety/wakapi/models/heartbeat.go:60.23,61.19 1 1
github.com/muety/wakapi/models/heartbeat.go:62.17,63.26 1 1
github.com/muety/wakapi/models/heartbeat.go:64.22,65.18 1 1
github.com/muety/wakapi/models/heartbeat.go:68.15,70.3 1 1
github.com/muety/wakapi/models/heartbeat.go:75.37,91.2 1 0
github.com/muety/wakapi/models/heartbeat.go:99.41,101.16 2 0
github.com/muety/wakapi/models/heartbeat.go:104.2,105.10 2 0
github.com/muety/wakapi/models/heartbeat.go:101.16,103.3 1 0
github.com/muety/wakapi/utils/common.go:10.48,12.2 1 0
github.com/muety/wakapi/utils/common.go:14.40,16.2 1 0
github.com/muety/wakapi/utils/common.go:18.45,20.2 1 0
github.com/muety/wakapi/utils/common.go:22.24,24.2 1 0
github.com/muety/wakapi/utils/common.go:26.56,29.45 3 1
github.com/muety/wakapi/utils/common.go:32.2,32.40 1 1
github.com/muety/wakapi/utils/common.go:29.45,31.3 1 1
github.com/muety/wakapi/utils/common.go:14.52,16.2 1 0
github.com/muety/wakapi/utils/common.go:18.40,20.2 1 0
github.com/muety/wakapi/utils/common.go:22.44,24.2 1 0
github.com/muety/wakapi/utils/common.go:26.45,28.2 1 0
github.com/muety/wakapi/utils/common.go:30.24,32.2 1 0
github.com/muety/wakapi/utils/common.go:34.56,37.45 3 1
github.com/muety/wakapi/utils/common.go:40.2,40.40 1 1
github.com/muety/wakapi/utils/common.go:37.45,39.3 1 1
github.com/muety/wakapi/utils/date.go:8.31,10.2 1 0
github.com/muety/wakapi/utils/date.go:12.43,14.2 1 0
github.com/muety/wakapi/utils/date.go:16.30,20.2 3 0
@ -160,33 +159,6 @@ github.com/muety/wakapi/utils/date.go:71.2,71.13 1 0
github.com/muety/wakapi/utils/date.go:59.36,62.3 2 0
github.com/muety/wakapi/utils/date.go:63.21,66.3 2 0
github.com/muety/wakapi/utils/date.go:67.21,70.3 2 0
github.com/muety/wakapi/utils/http.go:9.73,12.58 3 0
github.com/muety/wakapi/utils/http.go:12.58,14.3 1 0
github.com/muety/wakapi/utils/template.go:8.41,10.16 2 0
github.com/muety/wakapi/utils/template.go:13.2,13.23 1 0
github.com/muety/wakapi/utils/template.go:10.16,12.3 1 0
github.com/muety/wakapi/utils/template.go:16.37,17.30 1 0
github.com/muety/wakapi/utils/template.go:20.2,20.10 1 0
github.com/muety/wakapi/utils/template.go:17.30,19.3 1 0
github.com/muety/wakapi/utils/auth.go:16.79,18.54 2 0
github.com/muety/wakapi/utils/auth.go:22.2,24.16 3 0
github.com/muety/wakapi/utils/auth.go:28.2,30.45 3 0
github.com/muety/wakapi/utils/auth.go:33.2,34.32 2 0
github.com/muety/wakapi/utils/auth.go:18.54,20.3 1 0
github.com/muety/wakapi/utils/auth.go:24.16,26.3 1 0
github.com/muety/wakapi/utils/auth.go:30.45,32.3 1 0
github.com/muety/wakapi/utils/auth.go:37.65,39.85 2 0
github.com/muety/wakapi/utils/auth.go:43.2,44.30 2 0
github.com/muety/wakapi/utils/auth.go:39.85,41.3 1 0
github.com/muety/wakapi/utils/auth.go:47.94,49.16 2 0
github.com/muety/wakapi/utils/auth.go:53.2,53.107 1 0
github.com/muety/wakapi/utils/auth.go:57.2,57.22 1 0
github.com/muety/wakapi/utils/auth.go:49.16,51.3 1 0
github.com/muety/wakapi/utils/auth.go:53.107,55.3 1 0
github.com/muety/wakapi/utils/auth.go:60.56,64.2 3 0
github.com/muety/wakapi/utils/auth.go:66.55,69.16 3 0
github.com/muety/wakapi/utils/auth.go:72.2,72.16 1 0
github.com/muety/wakapi/utils/auth.go:69.16,71.3 1 0
github.com/muety/wakapi/utils/filesystem.go:14.68,16.16 2 0
github.com/muety/wakapi/utils/filesystem.go:20.2,21.15 2 0
github.com/muety/wakapi/utils/filesystem.go:33.2,33.15 1 0
@ -195,11 +167,8 @@ github.com/muety/wakapi/utils/filesystem.go:21.15,23.47 2 0
github.com/muety/wakapi/utils/filesystem.go:23.47,25.23 2 0
github.com/muety/wakapi/utils/filesystem.go:29.4,29.19 1 0
github.com/muety/wakapi/utils/filesystem.go:25.23,27.5 1 0
github.com/muety/wakapi/utils/strings.go:8.34,10.2 1 0
github.com/muety/wakapi/utils/strings.go:12.77,13.29 1 0
github.com/muety/wakapi/utils/strings.go:18.2,18.19 1 0
github.com/muety/wakapi/utils/strings.go:13.29,14.18 1 0
github.com/muety/wakapi/utils/strings.go:14.18,16.4 1 0
github.com/muety/wakapi/utils/http.go:9.73,12.58 3 0
github.com/muety/wakapi/utils/http.go:12.58,14.3 1 0
github.com/muety/wakapi/utils/summary.go:10.66,11.40 1 0
github.com/muety/wakapi/utils/summary.go:16.2,16.48 1 0
github.com/muety/wakapi/utils/summary.go:11.40,12.27 1 0
@ -225,78 +194,144 @@ github.com/muety/wakapi/utils/summary.go:62.35,63.43 1 0
github.com/muety/wakapi/utils/summary.go:64.26,65.21 1 0
github.com/muety/wakapi/utils/summary.go:66.10,67.39 1 0
github.com/muety/wakapi/utils/summary.go:73.73,80.56 5 0
github.com/muety/wakapi/utils/summary.go:96.2,103.8 2 0
github.com/muety/wakapi/utils/summary.go:102.2,109.8 2 0
github.com/muety/wakapi/utils/summary.go:80.56,82.3 1 0
github.com/muety/wakapi/utils/summary.go:82.8,82.54 1 0
github.com/muety/wakapi/utils/summary.go:82.54,84.3 1 0
github.com/muety/wakapi/utils/summary.go:84.8,86.17 2 0
github.com/muety/wakapi/utils/summary.go:90.3,91.17 2 0
github.com/muety/wakapi/utils/summary.go:86.17,88.4 1 0
github.com/muety/wakapi/utils/summary.go:91.17,93.4 1 0
github.com/muety/wakapi/config/config.go:103.70,105.2 1 0
github.com/muety/wakapi/config/config.go:107.65,109.2 1 0
github.com/muety/wakapi/config/config.go:111.82,121.2 1 0
github.com/muety/wakapi/config/config.go:123.31,125.2 1 0
github.com/muety/wakapi/config/config.go:127.32,129.2 1 0
github.com/muety/wakapi/config/config.go:131.74,132.19 1 0
github.com/muety/wakapi/config/config.go:133.10,134.34 1 0
github.com/muety/wakapi/config/config.go:134.34,143.4 8 0
github.com/muety/wakapi/config/config.go:147.73,148.33 1 0
github.com/muety/wakapi/config/config.go:148.33,156.17 5 0
github.com/muety/wakapi/config/config.go:160.3,161.13 2 0
github.com/muety/wakapi/config/config.go:156.17,158.4 1 0
github.com/muety/wakapi/config/config.go:165.50,166.19 1 0
github.com/muety/wakapi/config/config.go:179.2,179.12 1 0
github.com/muety/wakapi/config/config.go:167.23,171.5 1 0
github.com/muety/wakapi/config/config.go:172.26,175.5 1 0
github.com/muety/wakapi/config/config.go:176.24,177.48 1 0
github.com/muety/wakapi/config/config.go:182.53,192.2 1 1
github.com/muety/wakapi/config/config.go:194.56,196.16 2 1
github.com/muety/wakapi/config/config.go:200.2,207.3 1 1
github.com/muety/wakapi/config/config.go:196.16,198.3 1 0
github.com/muety/wakapi/config/config.go:210.54,212.2 1 1
github.com/muety/wakapi/config/config.go:214.60,216.2 1 0
github.com/muety/wakapi/config/config.go:218.59,220.2 1 0
github.com/muety/wakapi/config/config.go:222.57,224.2 1 0
github.com/muety/wakapi/config/config.go:226.53,228.2 1 0
github.com/muety/wakapi/config/config.go:230.29,232.2 1 1
github.com/muety/wakapi/config/config.go:234.27,236.16 2 0
github.com/muety/wakapi/config/config.go:239.2,242.16 3 0
github.com/muety/wakapi/config/config.go:246.2,246.41 1 0
github.com/muety/wakapi/config/config.go:236.16,238.3 1 0
github.com/muety/wakapi/config/config.go:242.16,244.3 1 0
github.com/muety/wakapi/config/config.go:249.48,261.16 3 0
github.com/muety/wakapi/config/config.go:264.2,266.16 3 0
github.com/muety/wakapi/config/config.go:270.2,270.55 1 0
github.com/muety/wakapi/config/config.go:274.2,274.15 1 0
github.com/muety/wakapi/config/config.go:261.16,263.3 1 0
github.com/muety/wakapi/config/config.go:266.16,268.3 1 0
github.com/muety/wakapi/config/config.go:270.55,272.3 1 0
github.com/muety/wakapi/config/config.go:277.38,278.43 1 0
github.com/muety/wakapi/config/config.go:281.2,281.15 1 0
github.com/muety/wakapi/config/config.go:278.43,280.3 1 0
github.com/muety/wakapi/config/config.go:284.45,285.27 1 0
github.com/muety/wakapi/config/config.go:288.2,288.15 1 0
github.com/muety/wakapi/config/config.go:285.27,287.3 1 0
github.com/muety/wakapi/config/config.go:291.26,293.2 1 0
github.com/muety/wakapi/config/config.go:295.20,297.2 1 0
github.com/muety/wakapi/config/config.go:299.21,304.96 3 0
github.com/muety/wakapi/config/config.go:308.2,316.52 5 0
github.com/muety/wakapi/config/config.go:320.2,320.47 1 0
github.com/muety/wakapi/config/config.go:326.2,326.70 1 0
github.com/muety/wakapi/config/config.go:330.2,330.28 1 0
github.com/muety/wakapi/config/config.go:334.2,335.14 2 0
github.com/muety/wakapi/config/config.go:304.96,306.3 1 0
github.com/muety/wakapi/config/config.go:316.52,318.3 1 0
github.com/muety/wakapi/config/config.go:320.47,321.14 1 0
github.com/muety/wakapi/config/config.go:321.14,323.4 1 0
github.com/muety/wakapi/config/config.go:326.70,328.3 1 0
github.com/muety/wakapi/config/config.go:330.28,332.3 1 0
github.com/muety/wakapi/utils/summary.go:93.3,94.17 2 0
github.com/muety/wakapi/utils/summary.go:86.17,88.18 2 0
github.com/muety/wakapi/utils/summary.go:88.18,90.5 1 0
github.com/muety/wakapi/utils/summary.go:94.17,96.18 2 0
github.com/muety/wakapi/utils/summary.go:96.18,98.5 1 0
github.com/muety/wakapi/utils/auth.go:16.79,18.54 2 0
github.com/muety/wakapi/utils/auth.go:22.2,24.16 3 0
github.com/muety/wakapi/utils/auth.go:28.2,30.45 3 0
github.com/muety/wakapi/utils/auth.go:33.2,34.32 2 0
github.com/muety/wakapi/utils/auth.go:18.54,20.3 1 0
github.com/muety/wakapi/utils/auth.go:24.16,26.3 1 0
github.com/muety/wakapi/utils/auth.go:30.45,32.3 1 0
github.com/muety/wakapi/utils/auth.go:37.65,39.85 2 0
github.com/muety/wakapi/utils/auth.go:43.2,44.30 2 0
github.com/muety/wakapi/utils/auth.go:39.85,41.3 1 0
github.com/muety/wakapi/utils/auth.go:47.94,49.16 2 0
github.com/muety/wakapi/utils/auth.go:53.2,53.107 1 0
github.com/muety/wakapi/utils/auth.go:57.2,57.22 1 0
github.com/muety/wakapi/utils/auth.go:49.16,51.3 1 0
github.com/muety/wakapi/utils/auth.go:53.107,55.3 1 0
github.com/muety/wakapi/utils/auth.go:60.56,64.2 3 0
github.com/muety/wakapi/utils/auth.go:66.55,69.16 3 0
github.com/muety/wakapi/utils/auth.go:72.2,72.16 1 0
github.com/muety/wakapi/utils/auth.go:69.16,71.3 1 0
github.com/muety/wakapi/utils/color.go:8.90,10.32 2 0
github.com/muety/wakapi/utils/color.go:15.2,15.15 1 0
github.com/muety/wakapi/utils/color.go:10.32,11.50 1 0
github.com/muety/wakapi/utils/color.go:11.50,13.4 1 0
github.com/muety/wakapi/utils/strings.go:8.34,10.2 1 0
github.com/muety/wakapi/utils/strings.go:12.77,13.29 1 0
github.com/muety/wakapi/utils/strings.go:18.2,18.19 1 0
github.com/muety/wakapi/utils/strings.go:13.29,14.18 1 0
github.com/muety/wakapi/utils/strings.go:14.18,16.4 1 0
github.com/muety/wakapi/utils/template.go:8.41,10.16 2 0
github.com/muety/wakapi/utils/template.go:13.2,13.23 1 0
github.com/muety/wakapi/utils/template.go:10.16,12.3 1 0
github.com/muety/wakapi/utils/template.go:16.37,17.30 1 0
github.com/muety/wakapi/utils/template.go:20.2,20.10 1 0
github.com/muety/wakapi/utils/template.go:17.30,19.3 1 0
github.com/muety/wakapi/config/config.go:104.70,106.2 1 0
github.com/muety/wakapi/config/config.go:108.65,110.2 1 0
github.com/muety/wakapi/config/config.go:112.82,122.2 1 0
github.com/muety/wakapi/config/config.go:124.31,126.2 1 0
github.com/muety/wakapi/config/config.go:128.32,130.2 1 0
github.com/muety/wakapi/config/config.go:132.74,133.19 1 0
github.com/muety/wakapi/config/config.go:134.10,135.34 1 0
github.com/muety/wakapi/config/config.go:135.34,144.4 8 0
github.com/muety/wakapi/config/config.go:148.73,149.33 1 0
github.com/muety/wakapi/config/config.go:149.33,157.17 5 0
github.com/muety/wakapi/config/config.go:161.3,162.13 2 0
github.com/muety/wakapi/config/config.go:157.17,159.4 1 0
github.com/muety/wakapi/config/config.go:166.50,167.19 1 0
github.com/muety/wakapi/config/config.go:180.2,180.12 1 0
github.com/muety/wakapi/config/config.go:168.23,172.5 1 0
github.com/muety/wakapi/config/config.go:173.26,176.5 1 0
github.com/muety/wakapi/config/config.go:177.24,178.48 1 0
github.com/muety/wakapi/config/config.go:183.53,194.2 1 1
github.com/muety/wakapi/config/config.go:196.56,198.16 2 1
github.com/muety/wakapi/config/config.go:202.2,209.3 1 1
github.com/muety/wakapi/config/config.go:198.16,200.3 1 0
github.com/muety/wakapi/config/config.go:212.54,214.2 1 1
github.com/muety/wakapi/config/config.go:216.60,218.2 1 0
github.com/muety/wakapi/config/config.go:220.59,222.2 1 0
github.com/muety/wakapi/config/config.go:224.57,226.2 1 0
github.com/muety/wakapi/config/config.go:228.53,230.2 1 0
github.com/muety/wakapi/config/config.go:232.29,234.2 1 1
github.com/muety/wakapi/config/config.go:236.27,238.16 2 0
github.com/muety/wakapi/config/config.go:241.2,244.16 3 0
github.com/muety/wakapi/config/config.go:248.2,248.41 1 0
github.com/muety/wakapi/config/config.go:238.16,240.3 1 0
github.com/muety/wakapi/config/config.go:244.16,246.3 1 0
github.com/muety/wakapi/config/config.go:251.48,263.16 3 0
github.com/muety/wakapi/config/config.go:266.2,268.16 3 0
github.com/muety/wakapi/config/config.go:272.2,272.55 1 0
github.com/muety/wakapi/config/config.go:276.2,276.15 1 0
github.com/muety/wakapi/config/config.go:263.16,265.3 1 0
github.com/muety/wakapi/config/config.go:268.16,270.3 1 0
github.com/muety/wakapi/config/config.go:272.55,274.3 1 0
github.com/muety/wakapi/config/config.go:279.38,280.43 1 0
github.com/muety/wakapi/config/config.go:283.2,283.15 1 0
github.com/muety/wakapi/config/config.go:280.43,282.3 1 0
github.com/muety/wakapi/config/config.go:286.45,287.27 1 0
github.com/muety/wakapi/config/config.go:290.2,290.15 1 0
github.com/muety/wakapi/config/config.go:287.27,289.3 1 0
github.com/muety/wakapi/config/config.go:293.26,295.2 1 0
github.com/muety/wakapi/config/config.go:297.20,299.2 1 0
github.com/muety/wakapi/config/config.go:301.21,306.96 3 0
github.com/muety/wakapi/config/config.go:310.2,318.52 5 0
github.com/muety/wakapi/config/config.go:322.2,322.47 1 0
github.com/muety/wakapi/config/config.go:328.2,328.70 1 0
github.com/muety/wakapi/config/config.go:332.2,332.28 1 0
github.com/muety/wakapi/config/config.go:336.2,337.14 2 0
github.com/muety/wakapi/config/config.go:306.96,308.3 1 0
github.com/muety/wakapi/config/config.go:318.52,320.3 1 0
github.com/muety/wakapi/config/config.go:322.47,323.14 1 0
github.com/muety/wakapi/config/config.go:323.14,325.4 1 0
github.com/muety/wakapi/config/config.go:328.70,330.3 1 0
github.com/muety/wakapi/config/config.go:332.28,334.3 1 0
github.com/muety/wakapi/config/utils.go:5.78,7.22 2 0
github.com/muety/wakapi/config/utils.go:13.2,13.11 1 0
github.com/muety/wakapi/config/utils.go:7.22,8.18 1 0
github.com/muety/wakapi/config/utils.go:11.3,11.12 1 0
github.com/muety/wakapi/config/utils.go:8.18,10.4 1 0
github.com/muety/wakapi/middlewares/filetype.go:13.83,14.43 1 0
github.com/muety/wakapi/middlewares/filetype.go:14.43,19.3 1 0
github.com/muety/wakapi/middlewares/filetype.go:22.84,24.34 2 0
github.com/muety/wakapi/middlewares/filetype.go:31.2,31.27 1 0
github.com/muety/wakapi/middlewares/filetype.go:24.34,25.50 1 0
github.com/muety/wakapi/middlewares/filetype.go:25.50,29.4 3 0
github.com/muety/wakapi/middlewares/logging.go:20.102,21.43 1 0
github.com/muety/wakapi/middlewares/logging.go:21.43,27.3 1 0
github.com/muety/wakapi/middlewares/logging.go:30.80,39.44 7 0
github.com/muety/wakapi/middlewares/logging.go:45.2,53.3 1 0
github.com/muety/wakapi/middlewares/logging.go:39.44,40.38 1 0
github.com/muety/wakapi/middlewares/logging.go:40.38,42.4 1 0
github.com/muety/wakapi/middlewares/logging.go:56.41,58.14 2 0
github.com/muety/wakapi/middlewares/logging.go:61.2,61.14 1 0
github.com/muety/wakapi/middlewares/logging.go:64.2,64.11 1 0
github.com/muety/wakapi/middlewares/logging.go:58.14,60.3 1 0
github.com/muety/wakapi/middlewares/logging.go:61.14,63.3 1 0
github.com/muety/wakapi/middlewares/logging.go:95.52,97.2 1 0
github.com/muety/wakapi/middlewares/logging.go:109.45,110.20 1 0
github.com/muety/wakapi/middlewares/logging.go:110.20,114.3 3 0
github.com/muety/wakapi/middlewares/logging.go:116.54,119.18 3 0
github.com/muety/wakapi/middlewares/logging.go:126.2,127.15 2 0
github.com/muety/wakapi/middlewares/logging.go:119.18,122.17 2 0
github.com/muety/wakapi/middlewares/logging.go:122.17,124.4 1 0
github.com/muety/wakapi/middlewares/logging.go:129.42,130.20 1 0
github.com/muety/wakapi/middlewares/logging.go:130.20,132.3 1 0
github.com/muety/wakapi/middlewares/logging.go:134.36,136.2 1 0
github.com/muety/wakapi/middlewares/logging.go:137.42,139.2 1 0
github.com/muety/wakapi/middlewares/logging.go:140.40,142.2 1 0
github.com/muety/wakapi/middlewares/logging.go:143.52,145.2 1 0
github.com/muety/wakapi/middlewares/authenticate.go:20.91,26.2 1 1
github.com/muety/wakapi/middlewares/authenticate.go:28.90,31.2 2 0
github.com/muety/wakapi/middlewares/authenticate.go:33.90,36.2 2 0
@ -326,53 +361,6 @@ github.com/muety/wakapi/middlewares/authenticate.go:102.2,103.16 2 0
github.com/muety/wakapi/middlewares/authenticate.go:110.2,110.18 1 0
github.com/muety/wakapi/middlewares/authenticate.go:98.16,100.3 1 0
github.com/muety/wakapi/middlewares/authenticate.go:103.16,105.3 1 0
github.com/muety/wakapi/middlewares/filetype.go:13.83,14.43 1 0
github.com/muety/wakapi/middlewares/filetype.go:14.43,19.3 1 0
github.com/muety/wakapi/middlewares/filetype.go:22.84,24.34 2 0
github.com/muety/wakapi/middlewares/filetype.go:31.2,31.27 1 0
github.com/muety/wakapi/middlewares/filetype.go:24.34,25.50 1 0
github.com/muety/wakapi/middlewares/filetype.go:25.50,29.4 3 0
github.com/muety/wakapi/middlewares/logging.go:19.105,20.43 1 0
github.com/muety/wakapi/middlewares/logging.go:20.43,26.3 1 0
github.com/muety/wakapi/middlewares/logging.go:29.80,38.44 7 0
github.com/muety/wakapi/middlewares/logging.go:44.2,53.3 1 0
github.com/muety/wakapi/middlewares/logging.go:38.44,39.38 1 0
github.com/muety/wakapi/middlewares/logging.go:39.38,41.4 1 0
github.com/muety/wakapi/middlewares/logging.go:56.41,58.14 2 0
github.com/muety/wakapi/middlewares/logging.go:61.2,61.14 1 0
github.com/muety/wakapi/middlewares/logging.go:64.2,64.11 1 0
github.com/muety/wakapi/middlewares/logging.go:58.14,60.3 1 0
github.com/muety/wakapi/middlewares/logging.go:61.14,63.3 1 0
github.com/muety/wakapi/middlewares/logging.go:95.52,97.2 1 0
github.com/muety/wakapi/middlewares/logging.go:109.45,110.20 1 0
github.com/muety/wakapi/middlewares/logging.go:110.20,114.3 3 0
github.com/muety/wakapi/middlewares/logging.go:116.54,119.18 3 0
github.com/muety/wakapi/middlewares/logging.go:126.2,127.15 2 0
github.com/muety/wakapi/middlewares/logging.go:119.18,122.17 2 0
github.com/muety/wakapi/middlewares/logging.go:122.17,124.4 1 0
github.com/muety/wakapi/middlewares/logging.go:129.42,130.20 1 0
github.com/muety/wakapi/middlewares/logging.go:130.20,132.3 1 0
github.com/muety/wakapi/middlewares/logging.go:134.36,136.2 1 0
github.com/muety/wakapi/middlewares/logging.go:137.42,139.2 1 0
github.com/muety/wakapi/middlewares/logging.go:140.40,142.2 1 0
github.com/muety/wakapi/middlewares/logging.go:143.52,145.2 1 0
github.com/muety/wakapi/services/heartbeat.go:17.141,23.2 1 0
github.com/muety/wakapi/services/heartbeat.go:25.72,27.2 1 0
github.com/muety/wakapi/services/heartbeat.go:29.80,31.2 1 0
github.com/muety/wakapi/services/heartbeat.go:33.53,35.2 1 0
github.com/muety/wakapi/services/heartbeat.go:37.76,39.2 1 0
github.com/muety/wakapi/services/heartbeat.go:41.96,43.2 1 0
github.com/muety/wakapi/services/heartbeat.go:45.111,47.16 2 0
github.com/muety/wakapi/services/heartbeat.go:50.2,50.43 1 0
github.com/muety/wakapi/services/heartbeat.go:47.16,49.3 1 0
github.com/muety/wakapi/services/heartbeat.go:53.116,55.2 1 0
github.com/muety/wakapi/services/heartbeat.go:57.78,59.2 1 0
github.com/muety/wakapi/services/heartbeat.go:61.62,63.2 1 0
github.com/muety/wakapi/services/heartbeat.go:65.116,67.16 2 0
github.com/muety/wakapi/services/heartbeat.go:71.2,71.28 1 0
github.com/muety/wakapi/services/heartbeat.go:75.2,75.24 1 0
github.com/muety/wakapi/services/heartbeat.go:67.16,69.3 1 0
github.com/muety/wakapi/services/heartbeat.go:71.28,73.3 1 0
github.com/muety/wakapi/services/key_value.go:14.89,19.2 1 0
github.com/muety/wakapi/services/key_value.go:21.83,23.2 1 0
github.com/muety/wakapi/services/key_value.go:25.78,27.16 2 0
@ -380,81 +368,48 @@ github.com/muety/wakapi/services/key_value.go:33.2,33.11 1 0
github.com/muety/wakapi/services/key_value.go:27.16,32.3 1 0
github.com/muety/wakapi/services/key_value.go:36.72,38.2 1 0
github.com/muety/wakapi/services/key_value.go:40.60,42.2 1 0
github.com/muety/wakapi/services/aggregation.go:24.142,31.2 1 0
github.com/muety/wakapi/services/aggregation.go:40.43,42.37 1 0
github.com/muety/wakapi/services/aggregation.go:46.2,48.19 3 0
github.com/muety/wakapi/services/aggregation.go:42.37,44.3 1 0
github.com/muety/wakapi/services/aggregation.go:51.67,55.40 3 0
github.com/muety/wakapi/services/aggregation.go:59.2,59.50 1 0
github.com/muety/wakapi/services/aggregation.go:64.2,64.60 1 0
github.com/muety/wakapi/services/aggregation.go:70.2,70.35 1 0
github.com/muety/wakapi/services/aggregation.go:55.40,57.3 1 0
github.com/muety/wakapi/services/aggregation.go:59.50,61.3 1 0
github.com/muety/wakapi/services/aggregation.go:64.60,68.3 3 0
github.com/muety/wakapi/services/aggregation.go:73.109,74.24 1 0
github.com/muety/wakapi/services/aggregation.go:74.24,75.111 1 0
github.com/muety/wakapi/services/aggregation.go:75.111,77.4 1 0
github.com/muety/wakapi/services/aggregation.go:77.9,80.4 2 0
github.com/muety/wakapi/services/aggregation.go:84.80,85.33 1 0
github.com/muety/wakapi/services/aggregation.go:85.33,86.60 1 0
github.com/muety/wakapi/services/aggregation.go:86.60,88.4 1 0
github.com/muety/wakapi/services/aggregation.go:92.100,96.59 3 0
github.com/muety/wakapi/services/aggregation.go:111.2,112.16 2 0
github.com/muety/wakapi/services/aggregation.go:118.2,119.16 2 0
github.com/muety/wakapi/services/aggregation.go:125.2,126.44 2 0
github.com/muety/wakapi/services/aggregation.go:131.2,131.41 1 0
github.com/muety/wakapi/services/aggregation.go:145.2,145.12 1 0
github.com/muety/wakapi/services/aggregation.go:96.59,99.3 2 0
github.com/muety/wakapi/services/aggregation.go:99.8,99.47 1 0
github.com/muety/wakapi/services/aggregation.go:99.47,101.30 2 0
github.com/muety/wakapi/services/aggregation.go:101.30,102.43 1 0
github.com/muety/wakapi/services/aggregation.go:102.43,104.5 1 0
github.com/muety/wakapi/services/aggregation.go:106.8,108.3 1 0
github.com/muety/wakapi/services/aggregation.go:112.16,115.3 2 0
github.com/muety/wakapi/services/aggregation.go:119.16,122.3 2 0
github.com/muety/wakapi/services/aggregation.go:126.44,128.3 1 0
github.com/muety/wakapi/services/aggregation.go:131.41,132.21 1 0
github.com/muety/wakapi/services/aggregation.go:132.21,136.4 1 0
github.com/muety/wakapi/services/aggregation.go:136.9,136.62 1 0
github.com/muety/wakapi/services/aggregation.go:136.62,140.4 1 0
github.com/muety/wakapi/services/aggregation.go:148.83,163.41 5 0
github.com/muety/wakapi/services/aggregation.go:163.41,173.3 3 0
github.com/muety/wakapi/services/aggregation.go:176.34,179.2 2 0
github.com/muety/wakapi/services/alias.go:17.77,22.2 1 1
github.com/muety/wakapi/services/alias.go:26.60,27.43 1 1
github.com/muety/wakapi/services/alias.go:30.2,30.14 1 1
github.com/muety/wakapi/services/alias.go:27.43,29.3 1 1
github.com/muety/wakapi/services/alias.go:33.62,35.16 2 1
github.com/muety/wakapi/services/alias.go:38.2,38.12 1 1
github.com/muety/wakapi/services/alias.go:35.16,37.3 1 1
github.com/muety/wakapi/services/alias.go:41.76,43.16 2 0
github.com/muety/wakapi/services/alias.go:46.2,46.21 1 0
github.com/muety/wakapi/services/alias.go:43.16,45.3 1 0
github.com/muety/wakapi/services/alias.go:49.113,51.16 2 0
github.com/muety/wakapi/services/alias.go:54.2,54.21 1 0
github.com/muety/wakapi/services/alias.go:51.16,53.3 1 0
github.com/muety/wakapi/services/alias.go:57.108,58.32 1 1
github.com/muety/wakapi/services/alias.go:64.2,65.46 2 1
github.com/muety/wakapi/services/alias.go:70.2,70.19 1 1
github.com/muety/wakapi/services/alias.go:58.32,59.52 1 1
github.com/muety/wakapi/services/alias.go:59.52,61.4 1 1
github.com/muety/wakapi/services/alias.go:65.46,66.48 1 1
github.com/muety/wakapi/services/alias.go:66.48,68.4 1 1
github.com/muety/wakapi/services/alias.go:73.77,75.16 2 0
github.com/muety/wakapi/services/alias.go:78.2,79.20 2 0
github.com/muety/wakapi/services/alias.go:75.16,77.3 1 0
github.com/muety/wakapi/services/alias.go:82.60,83.24 1 0
github.com/muety/wakapi/services/alias.go:86.2,88.12 3 0
github.com/muety/wakapi/services/alias.go:83.24,85.3 1 0
github.com/muety/wakapi/services/alias.go:91.69,94.28 3 0
github.com/muety/wakapi/services/alias.go:102.2,104.31 2 0
github.com/muety/wakapi/services/alias.go:108.2,108.12 1 0
github.com/muety/wakapi/services/alias.go:94.28,95.21 1 0
github.com/muety/wakapi/services/alias.go:98.3,99.16 2 0
github.com/muety/wakapi/services/alias.go:95.21,97.4 1 0
github.com/muety/wakapi/services/alias.go:104.31,106.3 1 0
github.com/muety/wakapi/services/alias.go:111.52,112.51 1 0
github.com/muety/wakapi/services/alias.go:112.51,114.3 1 0
github.com/muety/wakapi/services/language_mapping.go:18.118,24.2 1 0
github.com/muety/wakapi/services/language_mapping.go:26.86,28.2 1 0
github.com/muety/wakapi/services/language_mapping.go:30.96,31.53 1 0
github.com/muety/wakapi/services/language_mapping.go:35.2,36.16 2 0
github.com/muety/wakapi/services/language_mapping.go:39.2,40.22 2 0
github.com/muety/wakapi/services/language_mapping.go:31.53,33.3 1 0
github.com/muety/wakapi/services/language_mapping.go:36.16,38.3 1 0
github.com/muety/wakapi/services/language_mapping.go:43.92,46.16 3 0
github.com/muety/wakapi/services/language_mapping.go:50.2,50.33 1 0
github.com/muety/wakapi/services/language_mapping.go:53.2,53.22 1 0
github.com/muety/wakapi/services/language_mapping.go:46.16,48.3 1 0
github.com/muety/wakapi/services/language_mapping.go:50.33,52.3 1 0
github.com/muety/wakapi/services/language_mapping.go:56.109,58.16 2 0
github.com/muety/wakapi/services/language_mapping.go:62.2,63.20 2 0
github.com/muety/wakapi/services/language_mapping.go:58.16,60.3 1 0
github.com/muety/wakapi/services/language_mapping.go:66.82,67.26 1 0
github.com/muety/wakapi/services/language_mapping.go:70.2,72.12 3 0
github.com/muety/wakapi/services/language_mapping.go:67.26,69.3 1 0
github.com/muety/wakapi/services/language_mapping.go:75.74,78.2 1 0
github.com/muety/wakapi/services/misc.go:23.126,30.2 1 0
github.com/muety/wakapi/services/misc.go:42.50,44.48 1 0
github.com/muety/wakapi/services/misc.go:48.2,50.19 3 0
github.com/muety/wakapi/services/misc.go:44.48,46.3 1 0
github.com/muety/wakapi/services/misc.go:53.51,59.40 4 0
github.com/muety/wakapi/services/misc.go:63.2,66.56 2 0
github.com/muety/wakapi/services/misc.go:77.2,77.12 1 0
github.com/muety/wakapi/services/misc.go:59.40,61.3 1 0
github.com/muety/wakapi/services/misc.go:66.56,67.27 1 0
github.com/muety/wakapi/services/misc.go:67.27,72.4 1 0
github.com/muety/wakapi/services/misc.go:73.8,75.3 1 0
github.com/muety/wakapi/services/misc.go:80.116,81.24 1 0
github.com/muety/wakapi/services/misc.go:81.24,82.144 1 0
github.com/muety/wakapi/services/misc.go:91.3,91.48 1 0
github.com/muety/wakapi/services/misc.go:82.144,84.4 1 0
github.com/muety/wakapi/services/misc.go:84.9,90.4 2 0
github.com/muety/wakapi/services/misc.go:91.48,94.4 2 0
github.com/muety/wakapi/services/misc.go:98.86,101.30 3 0
github.com/muety/wakapi/services/misc.go:106.2,109.17 1 0
github.com/muety/wakapi/services/misc.go:113.2,116.17 1 0
github.com/muety/wakapi/services/misc.go:101.30,104.3 2 0
github.com/muety/wakapi/services/misc.go:109.17,111.3 1 0
github.com/muety/wakapi/services/misc.go:116.17,118.3 1 0
github.com/muety/wakapi/services/summary.go:27.149,35.2 1 1
github.com/muety/wakapi/services/summary.go:39.120,42.52 2 1
github.com/muety/wakapi/services/summary.go:47.2,47.44 1 1
@ -544,6 +499,63 @@ github.com/muety/wakapi/services/summary.go:324.54,326.3 1 1
github.com/muety/wakapi/services/summary.go:331.59,333.25 2 1
github.com/muety/wakapi/services/summary.go:336.2,336.32 1 1
github.com/muety/wakapi/services/summary.go:333.25,335.3 1 1
github.com/muety/wakapi/services/aggregation.go:24.142,31.2 1 0
github.com/muety/wakapi/services/aggregation.go:40.43,42.37 1 0
github.com/muety/wakapi/services/aggregation.go:46.2,48.19 3 0
github.com/muety/wakapi/services/aggregation.go:42.37,44.3 1 0
github.com/muety/wakapi/services/aggregation.go:51.67,55.40 3 0
github.com/muety/wakapi/services/aggregation.go:59.2,59.50 1 0
github.com/muety/wakapi/services/aggregation.go:64.2,64.60 1 0
github.com/muety/wakapi/services/aggregation.go:70.2,70.35 1 0
github.com/muety/wakapi/services/aggregation.go:55.40,57.3 1 0
github.com/muety/wakapi/services/aggregation.go:59.50,61.3 1 0
github.com/muety/wakapi/services/aggregation.go:64.60,68.3 3 0
github.com/muety/wakapi/services/aggregation.go:73.109,74.24 1 0
github.com/muety/wakapi/services/aggregation.go:74.24,75.111 1 0
github.com/muety/wakapi/services/aggregation.go:75.111,77.4 1 0
github.com/muety/wakapi/services/aggregation.go:77.9,80.4 2 0
github.com/muety/wakapi/services/aggregation.go:84.80,85.33 1 0
github.com/muety/wakapi/services/aggregation.go:85.33,86.60 1 0
github.com/muety/wakapi/services/aggregation.go:86.60,88.4 1 0
github.com/muety/wakapi/services/aggregation.go:92.100,96.59 3 0
github.com/muety/wakapi/services/aggregation.go:111.2,112.16 2 0
github.com/muety/wakapi/services/aggregation.go:118.2,119.16 2 0
github.com/muety/wakapi/services/aggregation.go:125.2,126.44 2 0
github.com/muety/wakapi/services/aggregation.go:131.2,131.41 1 0
github.com/muety/wakapi/services/aggregation.go:145.2,145.12 1 0
github.com/muety/wakapi/services/aggregation.go:96.59,99.3 2 0
github.com/muety/wakapi/services/aggregation.go:99.8,99.47 1 0
github.com/muety/wakapi/services/aggregation.go:99.47,101.30 2 0
github.com/muety/wakapi/services/aggregation.go:101.30,102.43 1 0
github.com/muety/wakapi/services/aggregation.go:102.43,104.5 1 0
github.com/muety/wakapi/services/aggregation.go:106.8,108.3 1 0
github.com/muety/wakapi/services/aggregation.go:112.16,115.3 2 0
github.com/muety/wakapi/services/aggregation.go:119.16,122.3 2 0
github.com/muety/wakapi/services/aggregation.go:126.44,128.3 1 0
github.com/muety/wakapi/services/aggregation.go:131.41,132.21 1 0
github.com/muety/wakapi/services/aggregation.go:132.21,136.4 1 0
github.com/muety/wakapi/services/aggregation.go:136.9,136.62 1 0
github.com/muety/wakapi/services/aggregation.go:136.62,140.4 1 0
github.com/muety/wakapi/services/aggregation.go:148.83,163.41 5 0
github.com/muety/wakapi/services/aggregation.go:163.41,173.3 3 0
github.com/muety/wakapi/services/aggregation.go:176.34,179.2 2 0
github.com/muety/wakapi/services/heartbeat.go:17.141,23.2 1 0
github.com/muety/wakapi/services/heartbeat.go:25.72,27.2 1 0
github.com/muety/wakapi/services/heartbeat.go:29.80,31.2 1 0
github.com/muety/wakapi/services/heartbeat.go:33.53,35.2 1 0
github.com/muety/wakapi/services/heartbeat.go:37.76,39.2 1 0
github.com/muety/wakapi/services/heartbeat.go:41.96,43.2 1 0
github.com/muety/wakapi/services/heartbeat.go:45.111,47.16 2 0
github.com/muety/wakapi/services/heartbeat.go:50.2,50.43 1 0
github.com/muety/wakapi/services/heartbeat.go:47.16,49.3 1 0
github.com/muety/wakapi/services/heartbeat.go:53.116,55.2 1 0
github.com/muety/wakapi/services/heartbeat.go:57.78,59.2 1 0
github.com/muety/wakapi/services/heartbeat.go:61.62,63.2 1 0
github.com/muety/wakapi/services/heartbeat.go:65.116,67.16 2 0
github.com/muety/wakapi/services/heartbeat.go:71.2,71.28 1 0
github.com/muety/wakapi/services/heartbeat.go:75.2,75.24 1 0
github.com/muety/wakapi/services/heartbeat.go:67.16,69.3 1 0
github.com/muety/wakapi/services/heartbeat.go:71.28,73.3 1 0
github.com/muety/wakapi/services/user.go:19.73,25.2 1 0
github.com/muety/wakapi/services/user.go:27.74,28.40 1 0
github.com/muety/wakapi/services/user.go:32.2,33.16 2 0
@ -558,58 +570,51 @@ github.com/muety/wakapi/services/user.go:47.16,49.3 1 0
github.com/muety/wakapi/services/user.go:55.58,57.2 1 0
github.com/muety/wakapi/services/user.go:59.61,62.2 2 0
github.com/muety/wakapi/services/user.go:64.48,66.2 1 0
github.com/muety/wakapi/services/user.go:68.102,76.93 2 0
github.com/muety/wakapi/services/user.go:82.2,82.38 1 0
github.com/muety/wakapi/services/user.go:76.93,78.3 1 0
github.com/muety/wakapi/services/user.go:78.8,80.3 1 0
github.com/muety/wakapi/services/user.go:85.73,88.2 2 0
github.com/muety/wakapi/services/user.go:90.78,94.2 3 0
github.com/muety/wakapi/services/user.go:96.99,99.2 2 0
github.com/muety/wakapi/services/user.go:101.106,104.96 3 0
github.com/muety/wakapi/services/user.go:109.2,109.68 1 0
github.com/muety/wakapi/services/user.go:104.96,106.3 1 0
github.com/muety/wakapi/services/user.go:106.8,108.3 1 0
github.com/muety/wakapi/services/user.go:112.57,115.2 2 0
github.com/muety/wakapi/services/user.go:117.38,119.2 1 0
github.com/muety/wakapi/services/language_mapping.go:18.118,24.2 1 0
github.com/muety/wakapi/services/language_mapping.go:26.86,28.2 1 0
github.com/muety/wakapi/services/language_mapping.go:30.96,31.53 1 0
github.com/muety/wakapi/services/language_mapping.go:35.2,36.16 2 0
github.com/muety/wakapi/services/language_mapping.go:39.2,40.22 2 0
github.com/muety/wakapi/services/language_mapping.go:31.53,33.3 1 0
github.com/muety/wakapi/services/language_mapping.go:36.16,38.3 1 0
github.com/muety/wakapi/services/language_mapping.go:43.92,46.16 3 0
github.com/muety/wakapi/services/language_mapping.go:50.2,50.33 1 0
github.com/muety/wakapi/services/language_mapping.go:53.2,53.22 1 0
github.com/muety/wakapi/services/language_mapping.go:46.16,48.3 1 0
github.com/muety/wakapi/services/language_mapping.go:50.33,52.3 1 0
github.com/muety/wakapi/services/language_mapping.go:56.109,58.16 2 0
github.com/muety/wakapi/services/language_mapping.go:62.2,63.20 2 0
github.com/muety/wakapi/services/language_mapping.go:58.16,60.3 1 0
github.com/muety/wakapi/services/language_mapping.go:66.82,67.26 1 0
github.com/muety/wakapi/services/language_mapping.go:70.2,72.12 3 0
github.com/muety/wakapi/services/language_mapping.go:67.26,69.3 1 0
github.com/muety/wakapi/services/language_mapping.go:75.74,78.2 1 0
github.com/muety/wakapi/services/misc.go:23.126,30.2 1 0
github.com/muety/wakapi/services/misc.go:42.50,44.48 1 0
github.com/muety/wakapi/services/misc.go:48.2,50.19 3 0
github.com/muety/wakapi/services/misc.go:44.48,46.3 1 0
github.com/muety/wakapi/services/misc.go:53.51,59.40 4 0
github.com/muety/wakapi/services/misc.go:63.2,66.56 2 0
github.com/muety/wakapi/services/misc.go:77.2,77.12 1 0
github.com/muety/wakapi/services/misc.go:59.40,61.3 1 0
github.com/muety/wakapi/services/misc.go:66.56,67.27 1 0
github.com/muety/wakapi/services/misc.go:67.27,72.4 1 0
github.com/muety/wakapi/services/misc.go:73.8,75.3 1 0
github.com/muety/wakapi/services/misc.go:80.116,81.24 1 0
github.com/muety/wakapi/services/misc.go:81.24,82.144 1 0
github.com/muety/wakapi/services/misc.go:91.3,91.48 1 0
github.com/muety/wakapi/services/misc.go:82.144,84.4 1 0
github.com/muety/wakapi/services/misc.go:84.9,90.4 2 0
github.com/muety/wakapi/services/misc.go:91.48,94.4 2 0
github.com/muety/wakapi/services/misc.go:98.86,101.30 3 0
github.com/muety/wakapi/services/misc.go:106.2,109.17 1 0
github.com/muety/wakapi/services/misc.go:113.2,116.17 1 0
github.com/muety/wakapi/services/misc.go:101.30,104.3 2 0
github.com/muety/wakapi/services/misc.go:109.17,111.3 1 0
github.com/muety/wakapi/services/misc.go:116.17,118.3 1 0
github.com/muety/wakapi/services/user.go:68.102,77.93 2 0
github.com/muety/wakapi/services/user.go:83.2,83.38 1 0
github.com/muety/wakapi/services/user.go:77.93,79.3 1 0
github.com/muety/wakapi/services/user.go:79.8,81.3 1 0
github.com/muety/wakapi/services/user.go:86.73,89.2 2 0
github.com/muety/wakapi/services/user.go:91.78,95.2 3 0
github.com/muety/wakapi/services/user.go:97.99,100.2 2 0
github.com/muety/wakapi/services/user.go:102.106,105.96 3 0
github.com/muety/wakapi/services/user.go:110.2,110.68 1 0
github.com/muety/wakapi/services/user.go:105.96,107.3 1 0
github.com/muety/wakapi/services/user.go:107.8,109.3 1 0
github.com/muety/wakapi/services/user.go:113.57,116.2 2 0
github.com/muety/wakapi/services/user.go:118.38,120.2 1 0
github.com/muety/wakapi/services/alias.go:17.77,22.2 1 1
github.com/muety/wakapi/services/alias.go:26.60,27.43 1 1
github.com/muety/wakapi/services/alias.go:30.2,30.14 1 1
github.com/muety/wakapi/services/alias.go:27.43,29.3 1 1
github.com/muety/wakapi/services/alias.go:33.62,35.16 2 1
github.com/muety/wakapi/services/alias.go:38.2,38.12 1 1
github.com/muety/wakapi/services/alias.go:35.16,37.3 1 1
github.com/muety/wakapi/services/alias.go:41.76,43.16 2 0
github.com/muety/wakapi/services/alias.go:46.2,46.21 1 0
github.com/muety/wakapi/services/alias.go:43.16,45.3 1 0
github.com/muety/wakapi/services/alias.go:49.113,51.16 2 0
github.com/muety/wakapi/services/alias.go:54.2,54.21 1 0
github.com/muety/wakapi/services/alias.go:51.16,53.3 1 0
github.com/muety/wakapi/services/alias.go:57.108,58.32 1 1
github.com/muety/wakapi/services/alias.go:64.2,65.46 2 1
github.com/muety/wakapi/services/alias.go:70.2,70.19 1 1
github.com/muety/wakapi/services/alias.go:58.32,59.52 1 1
github.com/muety/wakapi/services/alias.go:59.52,61.4 1 1
github.com/muety/wakapi/services/alias.go:65.46,66.48 1 1
github.com/muety/wakapi/services/alias.go:66.48,68.4 1 1
github.com/muety/wakapi/services/alias.go:73.77,75.16 2 0
github.com/muety/wakapi/services/alias.go:78.2,79.20 2 0
github.com/muety/wakapi/services/alias.go:75.16,77.3 1 0
github.com/muety/wakapi/services/alias.go:82.60,83.24 1 0
github.com/muety/wakapi/services/alias.go:86.2,88.12 3 0
github.com/muety/wakapi/services/alias.go:83.24,85.3 1 0
github.com/muety/wakapi/services/alias.go:91.69,94.28 3 0
github.com/muety/wakapi/services/alias.go:102.2,104.31 2 0
github.com/muety/wakapi/services/alias.go:108.2,108.12 1 0
github.com/muety/wakapi/services/alias.go:94.28,95.21 1 0
github.com/muety/wakapi/services/alias.go:98.3,99.16 2 0
github.com/muety/wakapi/services/alias.go:95.21,97.4 1 0
github.com/muety/wakapi/services/alias.go:104.31,106.3 1 0
github.com/muety/wakapi/services/alias.go:111.52,112.51 1 0
github.com/muety/wakapi/services/alias.go:112.51,114.3 1 0

View File

@ -8,26 +8,31 @@ import (
"time"
)
var languageRegex *regexp.Regexp
func init() {
languageRegex = regexp.MustCompile(`^.+\.(.+)$`)
}
type Heartbeat struct {
ID uint `gorm:"primary_key" hash:"ignore"`
User *User `json:"-" gorm:"not null; constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" hash:"ignore"`
UserID string `json:"-" gorm:"not null; index:idx_time_user"`
Entity string `json:"entity" gorm:"not null; index:idx_entity"`
Type string `json:"type"`
Category string `json:"category"`
Project string `json:"project"`
Branch string `json:"branch"`
Language string `json:"language" gorm:"index:idx_language"`
IsWrite bool `json:"is_write"`
Editor string `json:"editor" hash:"ignore"` // ignored because editor might be parsed differently by wakatime
OperatingSystem string `json:"operating_system" hash:"ignore"` // ignored because os might be parsed differently by wakatime
Machine string `json:"machine" hash:"ignore"` // ignored because wakatime api doesn't return machines currently
Time CustomTime `json:"time" gorm:"type:timestamp; index:idx_time,idx_time_user" swaggertype:"primitive,number"`
Hash string `json:"-" gorm:"type:varchar(17); uniqueIndex"`
Origin string `json:"-" hash:"ignore"`
OriginId string `json:"-" hash:"ignore"`
CreatedAt CustomTime `json:"created_at" gorm:"type:timestamp" swaggertype:"primitive,number"` // https://gorm.io/docs/conventions.html#CreatedAt
languageRegex *regexp.Regexp `hash:"ignore"`
ID uint `gorm:"primary_key" hash:"ignore"`
User *User `json:"-" gorm:"not null; constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" hash:"ignore"`
UserID string `json:"-" gorm:"not null; index:idx_time_user"`
Entity string `json:"entity" gorm:"not null; index:idx_entity"`
Type string `json:"type"`
Category string `json:"category"`
Project string `json:"project"`
Branch string `json:"branch"`
Language string `json:"language" gorm:"index:idx_language"`
IsWrite bool `json:"is_write"`
Editor string `json:"editor" hash:"ignore"` // ignored because editor might be parsed differently by wakatime
OperatingSystem string `json:"operating_system" hash:"ignore"` // ignored because os might be parsed differently by wakatime
Machine string `json:"machine" hash:"ignore"` // ignored because wakatime api doesn't return machines currently
Time CustomTime `json:"time" gorm:"type:timestamp; index:idx_time,idx_time_user" swaggertype:"primitive,number"`
Hash string `json:"-" gorm:"type:varchar(17); uniqueIndex"`
Origin string `json:"-" hash:"ignore"`
OriginId string `json:"-" hash:"ignore"`
CreatedAt CustomTime `json:"created_at" gorm:"type:timestamp" swaggertype:"primitive,number"` // https://gorm.io/docs/conventions.html#CreatedAt
}
func (h *Heartbeat) Valid() bool {
@ -35,10 +40,7 @@ func (h *Heartbeat) Valid() bool {
}
func (h *Heartbeat) Augment(languageMappings map[string]string) {
if h.languageRegex == nil {
h.languageRegex = regexp.MustCompile(`^.+\.(.+)$`)
}
groups := h.languageRegex.FindAllStringSubmatch(h.Entity, -1)
groups := languageRegex.FindAllStringSubmatch(h.Entity, -1)
if len(groups) == 0 || len(groups[0]) != 2 {
return
}

View File

@ -1,8 +1,23 @@
package models
import "regexp"
const (
MailPattern = "[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+"
)
var (
mailRegex *regexp.Regexp
)
func init() {
mailRegex = regexp.MustCompile(MailPattern)
}
type User struct {
ID string `json:"id" gorm:"primary_key"`
ApiKey string `json:"api_key" gorm:"unique"`
Email string `json:"email"`
Password string `json:"-"`
CreatedAt CustomTime `gorm:"type:timestamp; default:CURRENT_TIMESTAMP" swaggertype:"string" format:"date" example:"2006-01-02 15:04:05.000"`
LastLoggedInAt CustomTime `gorm:"type:timestamp; default:CURRENT_TIMESTAMP" swaggertype:"string" format:"date" example:"2006-01-02 15:04:05.000"`
@ -24,6 +39,7 @@ type Login struct {
type Signup struct {
Username string `schema:"username"`
Email string `schema:"email"`
Password string `schema:"password"`
PasswordRepeat string `schema:"password_repeat"`
}
@ -34,6 +50,10 @@ type CredentialsReset struct {
PasswordRepeat string `schema:"password_repeat"`
}
type UserDataUpdate struct {
Email string `schema:"email"`
}
type TimeByUser struct {
User string
Time CustomTime
@ -45,20 +65,29 @@ type CountByUser struct {
}
func (c *CredentialsReset) IsValid() bool {
return validatePassword(c.PasswordNew) &&
return ValidatePassword(c.PasswordNew) &&
c.PasswordNew == c.PasswordRepeat
}
func (s *Signup) IsValid() bool {
return validateUsername(s.Username) &&
validatePassword(s.Password) &&
return ValidateUsername(s.Username) &&
ValidateEmail(s.Email) &&
ValidatePassword(s.Password) &&
s.Password == s.PasswordRepeat
}
func validateUsername(username string) bool {
func (r *UserDataUpdate) IsValid() bool {
return ValidateEmail(r.Email)
}
func ValidateUsername(username string) bool {
return len(username) >= 1 && username != "current"
}
func validatePassword(password string) bool {
func ValidatePassword(password string) bool {
return len(password) >= 6
}
func ValidateEmail(email string) bool {
return email == "" || mailRegex.Match([]byte(email))
}

View File

@ -109,6 +109,7 @@ func (r *UserRepository) Update(user *models.User) (*models.User, error) {
updateMap := map[string]interface{}{
"api_key": user.ApiKey,
"password": user.Password,
"email": user.Email,
"last_logged_in_at": user.LastLoggedInAt,
"share_data_max_days": user.ShareDataMaxDays,
"share_editors": user.ShareEditors,

View File

@ -35,6 +35,9 @@ func loadTemplates() {
"toRunes": utils.ToRunes,
"entityTypes": models.SummaryTypes,
"typeName": typeName,
"isDev": func() bool {
return config.Get().IsDev()
},
"getBasePath": func() string {
return config.Get().Server.BasePath
},

View File

@ -117,6 +117,8 @@ func (h *SettingsHandler) dispatchAction(action string) action {
switch action {
case "change_password":
return h.actionChangePassword
case "update_user":
return h.actionUpdateUser
case "reset_apikey":
return h.actionResetApiKey
case "delete_alias":
@ -141,6 +143,34 @@ func (h *SettingsHandler) dispatchAction(action string) action {
return nil
}
func (h *SettingsHandler) actionUpdateUser(w http.ResponseWriter, r *http.Request) (int, string, string) {
if h.config.IsDev() {
loadTemplates()
}
user := r.Context().Value(models.UserKey).(*models.User)
var payload models.UserDataUpdate
if err := r.ParseForm(); err != nil {
return http.StatusBadRequest, "", "missing parameters"
}
if err := credentialsDecoder.Decode(&payload, r.PostForm); err != nil {
return http.StatusBadRequest, "", "missing parameters"
}
if !payload.IsValid() {
return http.StatusBadRequest, "", "invalid parameters"
}
user.Email = payload.Email
if _, err := h.userSrvc.Update(user); err != nil {
return http.StatusInternalServerError, "", conf.ErrInternalServerError
}
return http.StatusOK, "alias added successfully", ""
}
func (h *SettingsHandler) actionChangePassword(w http.ResponseWriter, r *http.Request) (int, string, string) {
if h.config.IsDev() {
loadTemplates()

View File

@ -68,6 +68,7 @@ func (srv *UserService) Count() (int64, error) {
func (srv *UserService) CreateOrGet(signup *models.Signup, isAdmin bool) (*models.User, bool, error) {
u := &models.User{
ID: signup.Username,
Email: signup.Email,
ApiKey: uuid.NewV4().String(),
Password: signup.Password,
IsAdmin: isAdmin,

View File

@ -1 +1 @@
1.24.4
1.24.5

View File

@ -35,6 +35,32 @@
<div class="flex flex-col flex-grow max-w-2xl mt-8">
<details class="my-8 pb-8 border-b border-gray-700">
<summary class="cursor-pointer">
<h2 class="font-semibold text-lg text-white m-0 border-b-2 border-green-700 inline-block"
id="email-heading">
Change E-Mail Address
</h2>
</summary>
<div class="w-full">
<form class="mt-10" action="" method="post">
<input type="hidden" name="action" value="update_user">
<div class="mb-8 flex justify-between items-center space-x-4">
<label class="inline-block text-sm text-gray-500" for="password_old">E-Mail Address</label>
<input class="shadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded flex-grow py-1 px-3"
type="email" id="email"
name="email" placeholder="Enter your e-mail address"
value="{{ .User.Email }}">
<button type="submit"
class="py-1 px-3 rounded bg-green-700 hover:bg-green-800 text-white text-sm">
Save
</button>
</div>
<div class="text-gray-300 text-sm">E-Mail address is optional, but required for some features that you cannot use else. Also, if you do not add an e-mail address, you will not be able to reset your password in case you forget it.</div>
</form>
</div>
</details>
<details class="mb-8 pb-8 border-b border-gray-700">
<summary class="cursor-pointer">
<h2 class="font-semibold text-lg text-white m-0 border-b-2 border-green-700 inline-block" id="password">
Change Password

View File

@ -3,7 +3,7 @@
{{ template "head.tpl.html" . }}
<body class="bg-gray-800 text-gray-700 p-4 pt-10 flex flex-col min-h-screen max-w-screen-xl mx-auto justify-center">
<body class="bg-gray-850 text-gray-700 p-4 pt-10 flex flex-col min-h-screen max-w-screen-xl mx-auto justify-center">
<div class="w-full flex justify-center">
<div class="flex items-center justify-between max-w-4xl flex-grow">
<div><a href="" class="text-gray-500 text-sm">&larr; Go back</a></div>
@ -37,6 +37,13 @@
type="text" id="username"
name="username" placeholder="Choose a username" minlength="1" required autofocus>
</div>
<div class="mb-8">
<label class="inline-block text-sm mb-1 text-gray-500" for="email">E-Mail</label>
<input class="shadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded w-full py-1 px-3"
type="email" id="email"
name="email" placeholder="Optionally add your e-mail address">
<div class="text-xs text-gray-500 mt-2 italic">E-Mail address is optional, but required for some features that you cannot use else. Also, if you do not add an e-mail address, you will not be able to reset your password in case you forget it.</div>
</div>
<div class="mb-8">
<label class="inline-block text-sm mb-1 text-gray-500" for="password">Password</label>
<input class="shadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded w-full py-1 px-3"