From f82ab8293b7bb2a01fb303bf37aaa0b21c00cf78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferdinand=20M=C3=BCtsch?= Date: Sat, 2 Dec 2023 14:12:58 +0100 Subject: [PATCH] fix: make leaders endpoint publicly accessible --- coverage/coverage.out | 964 ++++++++++++++------------- middlewares/authenticate.go | 2 +- routes/api/activity.go | 2 +- routes/api/badge.go | 2 +- routes/compat/wakatime/v1/leaders.go | 10 +- routes/compat/wakatime/v1/stats.go | 2 +- routes/leaderboard.go | 2 +- routes/login.go | 2 +- 8 files changed, 516 insertions(+), 470 deletions(-) diff --git a/coverage/coverage.out b/coverage/coverage.out index bcf85c6f..8a2cf222 100644 --- a/coverage/coverage.out +++ b/coverage/coverage.out @@ -283,7 +283,7 @@ github.com/muety/wakapi/helpers/summary.go:75.48,79.51 2 0 github.com/muety/wakapi/helpers/summary.go:79.51,81.3 1 0 github.com/muety/wakapi/helpers/summary.go:82.2,82.12 1 0 github.com/muety/wakapi/middlewares/authenticate.go:35.91,41.2 1 1 -github.com/muety/wakapi/middlewares/authenticate.go:43.90,46.2 2 0 +github.com/muety/wakapi/middlewares/authenticate.go:43.91,46.2 2 0 github.com/muety/wakapi/middlewares/authenticate.go:48.90,51.2 2 0 github.com/muety/wakapi/middlewares/authenticate.go:53.99,56.2 2 0 github.com/muety/wakapi/middlewares/authenticate.go:58.71,59.71 1 0 @@ -386,355 +386,6 @@ github.com/muety/wakapi/middlewares/sentry.go:16.43,20.3 1 0 github.com/muety/wakapi/middlewares/sentry.go:23.78,26.54 3 0 github.com/muety/wakapi/middlewares/sentry.go:26.54,27.43 1 0 github.com/muety/wakapi/middlewares/sentry.go:27.43,29.4 1 0 -github.com/muety/wakapi/routes/api/activity.go:22.126,28.2 1 0 -github.com/muety/wakapi/routes/api/activity.go:30.64,39.2 4 0 -github.com/muety/wakapi/routes/api/activity.go:41.87,44.16 3 0 -github.com/muety/wakapi/routes/api/activity.go:44.16,47.3 2 0 -github.com/muety/wakapi/routes/api/activity.go:49.2,49.68 1 0 -github.com/muety/wakapi/routes/api/activity.go:49.68,50.159 1 0 -github.com/muety/wakapi/routes/api/activity.go:50.159,53.4 2 0 -github.com/muety/wakapi/routes/api/activity.go:56.2,60.16 4 0 -github.com/muety/wakapi/routes/api/activity.go:60.16,64.3 3 0 -github.com/muety/wakapi/routes/api/activity.go:66.2,69.24 4 0 -github.com/muety/wakapi/routes/api/avatar.go:19.40,21.16 2 0 -github.com/muety/wakapi/routes/api/avatar.go:21.16,22.13 1 0 -github.com/muety/wakapi/routes/api/avatar.go:25.2,28.3 1 0 -github.com/muety/wakapi/routes/api/avatar.go:31.59,36.2 4 0 -github.com/muety/wakapi/routes/api/avatar.go:38.69,41.37 2 0 -github.com/muety/wakapi/routes/api/avatar.go:41.37,43.3 1 0 -github.com/muety/wakapi/routes/api/avatar.go:45.2,45.29 1 0 -github.com/muety/wakapi/routes/api/avatar.go:45.29,47.3 1 0 -github.com/muety/wakapi/routes/api/avatar.go:48.2,53.32 5 0 -github.com/muety/wakapi/routes/api/badge.go:28.112,35.2 1 1 -github.com/muety/wakapi/routes/api/badge.go:37.58,42.2 4 1 -github.com/muety/wakapi/routes/api/badge.go:44.68,47.16 3 1 -github.com/muety/wakapi/routes/api/badge.go:47.16,50.3 2 0 -github.com/muety/wakapi/routes/api/badge.go:52.2,53.16 2 1 -github.com/muety/wakapi/routes/api/badge.go:53.16,57.3 3 1 -github.com/muety/wakapi/routes/api/badge.go:59.2,61.62 3 1 -github.com/muety/wakapi/routes/api/badge.go:61.62,64.3 2 0 -github.com/muety/wakapi/routes/api/badge.go:66.2,74.16 3 1 -github.com/muety/wakapi/routes/api/badge.go:74.16,78.3 3 0 -github.com/muety/wakapi/routes/api/badge.go:80.2,81.66 2 1 -github.com/muety/wakapi/routes/api/badge.go:81.66,83.3 1 0 -github.com/muety/wakapi/routes/api/badge.go:84.2,84.66 1 1 -github.com/muety/wakapi/routes/api/badge.go:84.66,86.3 1 0 -github.com/muety/wakapi/routes/api/badge.go:88.2,88.101 1 1 -github.com/muety/wakapi/routes/api/badge.go:88.101,90.3 1 1 -github.com/muety/wakapi/routes/api/badge.go:92.2,94.25 3 1 -github.com/muety/wakapi/routes/api/badge.go:97.53,102.2 4 1 -github.com/muety/wakapi/routes/api/diagnostics.go:20.138,26.2 1 0 -github.com/muety/wakapi/routes/api/diagnostics.go:28.67,30.2 1 0 -github.com/muety/wakapi/routes/api/diagnostics.go:39.78,42.69 2 0 -github.com/muety/wakapi/routes/api/diagnostics.go:42.69,47.3 4 0 -github.com/muety/wakapi/routes/api/diagnostics.go:49.2,49.66 1 0 -github.com/muety/wakapi/routes/api/diagnostics.go:49.66,54.3 4 0 -github.com/muety/wakapi/routes/api/diagnostics.go:56.2,56.59 1 0 -github.com/muety/wakapi/routes/api/health.go:15.57,17.2 1 0 -github.com/muety/wakapi/routes/api/health.go:19.62,21.2 1 0 -github.com/muety/wakapi/routes/api/health.go:29.72,31.41 2 0 -github.com/muety/wakapi/routes/api/health.go:31.41,32.38 1 0 -github.com/muety/wakapi/routes/api/health.go:32.38,34.4 1 0 -github.com/muety/wakapi/routes/api/health.go:37.2,38.56 2 0 -github.com/muety/wakapi/routes/api/heartbeat.go:26.187,33.2 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:39.65,40.34 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:40.34,54.3 9 0 -github.com/muety/wakapi/routes/api/heartbeat.go:65.76,67.16 2 0 -github.com/muety/wakapi/routes/api/heartbeat.go:67.16,69.3 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:71.2,73.16 3 0 -github.com/muety/wakapi/routes/api/heartbeat.go:73.16,78.3 4 0 -github.com/muety/wakapi/routes/api/heartbeat.go:80.2,84.32 4 0 -github.com/muety/wakapi/routes/api/heartbeat.go:84.32,85.16 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:85.16,89.4 3 0 -github.com/muety/wakapi/routes/api/heartbeat.go:92.3,92.25 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:92.25,97.4 4 0 -github.com/muety/wakapi/routes/api/heartbeat.go:98.3,98.23 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:98.23,100.4 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:102.3,102.37 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:102.37,103.150 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:103.150,105.5 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:108.3,115.65 7 0 -github.com/muety/wakapi/routes/api/heartbeat.go:115.65,119.4 3 0 -github.com/muety/wakapi/routes/api/heartbeat.go:121.3,121.14 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:124.2,124.64 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:124.64,129.3 4 0 -github.com/muety/wakapi/routes/api/heartbeat.go:131.2,131.19 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:131.19,133.52 2 0 -github.com/muety/wakapi/routes/api/heartbeat.go:133.52,138.4 4 0 -github.com/muety/wakapi/routes/api/heartbeat.go:141.2,141.15 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:141.16,141.17 0 0 -github.com/muety/wakapi/routes/api/heartbeat.go:143.2,143.90 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:152.59,155.25 2 0 -github.com/muety/wakapi/routes/api/heartbeat.go:155.25,160.3 4 0 -github.com/muety/wakapi/routes/api/heartbeat.go:162.2,164.3 1 0 -github.com/muety/wakapi/routes/api/heartbeat.go:178.45,178.46 0 0 -github.com/muety/wakapi/routes/api/heartbeat.go:189.45,189.46 0 0 -github.com/muety/wakapi/routes/api/heartbeat.go:200.45,200.46 0 0 -github.com/muety/wakapi/routes/api/heartbeat.go:210.45,210.46 0 0 -github.com/muety/wakapi/routes/api/heartbeat.go:221.45,221.46 0 0 -github.com/muety/wakapi/routes/api/heartbeat.go:232.45,232.46 0 0 -github.com/muety/wakapi/routes/api/heartbeat.go:243.45,243.46 0 0 -github.com/muety/wakapi/routes/api/metrics.go:64.249,73.2 1 0 -github.com/muety/wakapi/routes/api/metrics.go:75.60,76.38 1 0 -github.com/muety/wakapi/routes/api/metrics.go:76.38,78.3 1 0 -github.com/muety/wakapi/routes/api/metrics.go:80.2,86.29 5 0 -github.com/muety/wakapi/routes/api/metrics.go:89.70,91.20 2 0 -github.com/muety/wakapi/routes/api/metrics.go:91.20,95.3 3 0 -github.com/muety/wakapi/routes/api/metrics.go:97.2,99.63 2 0 -github.com/muety/wakapi/routes/api/metrics.go:99.63,104.3 4 0 -github.com/muety/wakapi/routes/api/metrics.go:104.8,105.34 1 0 -github.com/muety/wakapi/routes/api/metrics.go:105.34,107.4 1 0 -github.com/muety/wakapi/routes/api/metrics.go:110.2,110.21 1 0 -github.com/muety/wakapi/routes/api/metrics.go:110.21,111.66 1 0 -github.com/muety/wakapi/routes/api/metrics.go:111.66,116.4 4 0 -github.com/muety/wakapi/routes/api/metrics.go:116.9,117.36 1 0 -github.com/muety/wakapi/routes/api/metrics.go:117.36,119.5 1 0 -github.com/muety/wakapi/routes/api/metrics.go:123.2,126.34 3 0 -github.com/muety/wakapi/routes/api/metrics.go:129.81,133.16 3 0 -github.com/muety/wakapi/routes/api/metrics.go:133.16,136.3 2 0 -github.com/muety/wakapi/routes/api/metrics.go:138.2,141.16 3 0 -github.com/muety/wakapi/routes/api/metrics.go:141.16,144.3 2 0 -github.com/muety/wakapi/routes/api/metrics.go:146.2,147.16 2 0 -github.com/muety/wakapi/routes/api/metrics.go:147.16,150.3 2 0 -github.com/muety/wakapi/routes/api/metrics.go:154.2,175.42 4 0 -github.com/muety/wakapi/routes/api/metrics.go:175.42,182.3 1 0 -github.com/muety/wakapi/routes/api/metrics.go:184.2,184.43 1 0 -github.com/muety/wakapi/routes/api/metrics.go:184.43,191.3 1 0 -github.com/muety/wakapi/routes/api/metrics.go:193.2,193.41 1 0 -github.com/muety/wakapi/routes/api/metrics.go:193.41,200.3 1 0 -github.com/muety/wakapi/routes/api/metrics.go:202.2,202.50 1 0 -github.com/muety/wakapi/routes/api/metrics.go:202.50,209.3 1 0 -github.com/muety/wakapi/routes/api/metrics.go:211.2,211.42 1 0 -github.com/muety/wakapi/routes/api/metrics.go:211.42,218.3 1 0 -github.com/muety/wakapi/routes/api/metrics.go:220.2,220.40 1 0 -github.com/muety/wakapi/routes/api/metrics.go:220.40,227.3 1 0 -github.com/muety/wakapi/routes/api/metrics.go:230.2,270.16 9 0 -github.com/muety/wakapi/routes/api/metrics.go:270.16,272.3 1 0 -github.com/muety/wakapi/routes/api/metrics.go:274.2,282.44 2 0 -github.com/muety/wakapi/routes/api/metrics.go:282.44,296.3 2 0 -github.com/muety/wakapi/routes/api/metrics.go:298.2,298.22 1 0 -github.com/muety/wakapi/routes/api/metrics.go:301.82,307.19 4 0 -github.com/muety/wakapi/routes/api/metrics.go:307.19,309.3 1 0 -github.com/muety/wakapi/routes/api/metrics.go:311.2,312.106 2 0 -github.com/muety/wakapi/routes/api/metrics.go:312.106,313.56 1 0 -github.com/muety/wakapi/routes/api/metrics.go:313.56,315.4 1 0 -github.com/muety/wakapi/routes/api/metrics.go:318.2,323.16 5 0 -github.com/muety/wakapi/routes/api/metrics.go:323.16,326.3 2 0 -github.com/muety/wakapi/routes/api/metrics.go:327.2,360.16 7 0 -github.com/muety/wakapi/routes/api/metrics.go:360.16,363.3 2 0 -github.com/muety/wakapi/routes/api/metrics.go:365.2,365.32 1 0 -github.com/muety/wakapi/routes/api/metrics.go:365.32,372.3 1 0 -github.com/muety/wakapi/routes/api/metrics.go:373.2,383.29 6 0 -github.com/muety/wakapi/routes/api/metrics.go:383.29,384.20 1 0 -github.com/muety/wakapi/routes/api/metrics.go:384.20,386.18 2 0 -github.com/muety/wakapi/routes/api/metrics.go:386.18,389.5 2 0 -github.com/muety/wakapi/routes/api/metrics.go:390.4,397.6 3 0 -github.com/muety/wakapi/routes/api/metrics.go:401.2,404.22 3 0 -github.com/muety/wakapi/routes/api/summary.go:20.122,26.2 1 0 -github.com/muety/wakapi/routes/api/summary.go:28.63,34.2 4 0 -github.com/muety/wakapi/routes/api/summary.go:53.73,55.16 2 0 -github.com/muety/wakapi/routes/api/summary.go:55.16,59.3 3 0 -github.com/muety/wakapi/routes/api/summary.go:61.2,61.51 1 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:20.13,23.2 2 1 -github.com/muety/wakapi/routes/utils/badge_utils.go:25.129,29.76 3 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:29.76,31.3 1 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:33.2,34.72 2 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:34.72,35.61 1 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:35.61,37.4 1 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:40.2,48.86 4 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:48.86,50.3 1 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:52.2,54.22 3 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:55.17,57.68 2 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:58.12,60.63 2 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:61.16,63.67 2 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:64.18,66.69 2 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:67.17,69.68 2 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:70.15,72.66 2 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:74.10,77.30 2 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:80.2,80.34 1 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:80.34,82.3 1 0 -github.com/muety/wakapi/routes/utils/badge_utils.go:84.2,84.31 1 0 -github.com/muety/wakapi/routes/utils/heartbeat_utils.go:11.68,13.16 2 0 -github.com/muety/wakapi/routes/utils/heartbeat_utils.go:13.16,15.3 1 0 -github.com/muety/wakapi/routes/utils/heartbeat_utils.go:17.2,18.16 2 0 -github.com/muety/wakapi/routes/utils/heartbeat_utils.go:18.16,20.3 1 0 -github.com/muety/wakapi/routes/utils/heartbeat_utils.go:22.2,22.35 1 0 -github.com/muety/wakapi/routes/utils/heartbeat_utils.go:25.65,33.48 6 0 -github.com/muety/wakapi/routes/utils/heartbeat_utils.go:33.48,35.3 1 0 -github.com/muety/wakapi/routes/utils/heartbeat_utils.go:37.2,37.24 1 0 -github.com/muety/wakapi/routes/utils/heartbeat_utils.go:40.67,48.47 6 0 -github.com/muety/wakapi/routes/utils/heartbeat_utils.go:48.47,50.3 1 0 -github.com/muety/wakapi/routes/utils/heartbeat_utils.go:52.2,52.45 1 0 -github.com/muety/wakapi/routes/utils/messages.go:9.71,11.2 1 0 -github.com/muety/wakapi/routes/utils/messages.go:13.73,15.2 1 0 -github.com/muety/wakapi/routes/utils/messages.go:17.97,19.57 2 0 -github.com/muety/wakapi/routes/utils/messages.go:19.57,21.3 1 0 -github.com/muety/wakapi/routes/utils/messages.go:22.2,22.65 1 0 -github.com/muety/wakapi/routes/utils/messages.go:22.65,24.3 1 0 -github.com/muety/wakapi/routes/utils/messages.go:25.2,26.11 2 0 -github.com/muety/wakapi/routes/utils/messages.go:29.78,33.2 3 0 -github.com/muety/wakapi/routes/utils/project_utils.go:15.144,18.16 2 0 -github.com/muety/wakapi/routes/utils/project_utils.go:18.16,20.3 1 0 -github.com/muety/wakapi/routes/utils/project_utils.go:23.2,24.16 2 0 -github.com/muety/wakapi/routes/utils/project_utils.go:24.16,26.3 1 0 -github.com/muety/wakapi/routes/utils/project_utils.go:28.2,32.35 2 0 -github.com/muety/wakapi/routes/utils/project_utils.go:32.35,35.3 2 0 -github.com/muety/wakapi/routes/utils/project_utils.go:37.2,39.20 3 0 -github.com/muety/wakapi/routes/utils/summary_utils.go:12.98,14.16 2 0 -github.com/muety/wakapi/routes/utils/summary_utils.go:14.16,16.3 1 0 -github.com/muety/wakapi/routes/utils/summary_utils.go:17.2,17.51 1 0 -github.com/muety/wakapi/routes/utils/summary_utils.go:20.119,22.22 2 0 -github.com/muety/wakapi/routes/utils/summary_utils.go:22.22,24.3 1 0 -github.com/muety/wakapi/routes/utils/summary_utils.go:26.2,34.16 2 0 -github.com/muety/wakapi/routes/utils/summary_utils.go:34.16,36.3 1 0 -github.com/muety/wakapi/routes/utils/summary_utils.go:38.2,41.36 3 0 -github.com/muety/wakapi/routes/utils/summary_utils.go:44.90,46.32 2 0 -github.com/muety/wakapi/routes/utils/summary_utils.go:46.32,47.50 1 0 -github.com/muety/wakapi/routes/utils/summary_utils.go:47.50,49.4 1 0 -github.com/muety/wakapi/routes/utils/summary_utils.go:51.2,51.15 1 0 -github.com/muety/wakapi/routes/utils/user_utils.go:15.139,16.68 1 1 -github.com/muety/wakapi/routes/utils/user_utils.go:16.68,21.3 4 1 -github.com/muety/wakapi/routes/utils/user_utils.go:23.2,24.21 2 1 -github.com/muety/wakapi/routes/utils/user_utils.go:24.21,26.3 1 1 -github.com/muety/wakapi/routes/utils/user_utils.go:28.2,29.27 2 1 -github.com/muety/wakapi/routes/utils/user_utils.go:29.27,31.3 1 1 -github.com/muety/wakapi/routes/utils/user_utils.go:31.8,31.35 1 1 -github.com/muety/wakapi/routes/utils/user_utils.go:31.35,33.3 1 1 -github.com/muety/wakapi/routes/utils/user_utils.go:35.2,35.63 1 1 -github.com/muety/wakapi/routes/utils/user_utils.go:35.63,37.3 1 1 -github.com/muety/wakapi/routes/utils/user_utils.go:39.2,40.16 2 1 -github.com/muety/wakapi/routes/utils/user_utils.go:40.16,42.3 1 0 -github.com/muety/wakapi/routes/utils/user_utils.go:44.2,44.27 1 1 -github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:23.116,29.2 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:31.60,32.34 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:32.34,35.3 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:47.70,49.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:49.16,51.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:53.2,54.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:54.16,58.3 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:60.2,61.46 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:64.116,73.29 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:73.29,75.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:77.2,85.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:85.16,87.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:89.2,89.36 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:29.124,34.2 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:36.62,37.34 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:37.34,40.3 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:52.72,54.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:54.16,56.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:58.2,61.16 4 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:61.16,65.3 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:67.2,71.16 4 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:71.16,76.3 4 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:78.2,84.47 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:27.123,33.2 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:35.61,36.34 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:36.34,40.3 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:53.71,55.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:55.16,57.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:59.2,60.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:60.16,65.3 4 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:67.2,68.46 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:81.74,83.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:83.16,85.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:87.2,88.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:88.16,93.3 4 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:95.2,95.24 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:95.24,99.3 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:101.2,102.46 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:105.104,107.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:107.16,109.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:111.2,112.28 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:112.28,113.79 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:113.79,122.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:125.2,125.22 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:23.112,29.2 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:31.58,32.34 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:32.34,42.3 5 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:63.68,69.53 5 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:69.53,71.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:73.2,74.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:74.16,78.3 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:82.2,82.22 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:82.22,83.100 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:83.100,85.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:85.9,87.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:90.2,91.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:91.16,95.3 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:97.2,99.69 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:99.69,103.3 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:105.2,106.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:106.16,110.3 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:112.2,118.68 6 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:118.68,120.34 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:120.34,122.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:123.3,123.36 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:123.36,125.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:126.3,126.35 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:126.35,128.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:129.3,129.30 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:129.30,131.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:132.3,132.35 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:132.35,134.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:137.2,137.49 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:140.136,149.16 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:149.16,151.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:153.2,153.36 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:29.120,35.2 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:37.62,38.34 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:38.34,43.3 4 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:55.72,57.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:57.16,59.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:61.2,62.22 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:62.22,64.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:66.2,67.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:67.16,71.3 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:73.2,74.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:74.16,78.3 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:79.2,83.4 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:86.115,95.29 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:95.29,97.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:99.2,100.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:100.16,102.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:104.2,104.36 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:27.120,33.2 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:35.62,36.34 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:36.34,39.3 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:65.72,67.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:67.16,69.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:71.2,72.16 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:72.16,76.3 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:78.2,79.46 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:82.114,87.19 4 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:87.19,88.56 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:88.56,90.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:93.2,94.22 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:94.22,96.98 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:96.98,98.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:98.9,100.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:101.8,101.130 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:101.130,104.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:104.8,109.17 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:109.17,111.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:113.3,114.17 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:114.17,116.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:123.2,125.23 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:125.23,127.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:129.2,141.37 5 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:141.37,143.17 2 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:143.17,145.4 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:147.3,149.25 3 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:152.2,152.38 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:21.116,27.2 1 1 -github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:29.58,30.34 1 1 -github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:30.34,33.3 2 1 -github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:45.68,47.16 2 1 -github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:47.16,49.3 1 1 -github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:51.2,52.72 2 1 -github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:52.72,54.3 1 1 -github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:54.8,56.3 1 0 -github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:58.2,58.72 1 1 github.com/muety/wakapi/models/alias.go:18.32,20.2 1 0 github.com/muety/wakapi/models/alias.go:22.37,23.35 1 0 github.com/muety/wakapi/models/alias.go:23.35,24.18 1 0 @@ -912,36 +563,42 @@ 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/leaderboard.go:28.73,30.2 1 0 -github.com/muety/wakapi/models/leaderboard.go:34.56,35.103 1 0 -github.com/muety/wakapi/models/leaderboard.go:35.103,37.3 1 0 -github.com/muety/wakapi/models/leaderboard.go:37.13,39.3 1 0 -github.com/muety/wakapi/models/leaderboard.go:42.63,43.29 1 0 -github.com/muety/wakapi/models/leaderboard.go:43.29,45.3 1 0 -github.com/muety/wakapi/models/leaderboard.go:49.37,50.94 1 0 -github.com/muety/wakapi/models/leaderboard.go:50.94,52.3 1 0 -github.com/muety/wakapi/models/leaderboard.go:55.41,56.123 1 0 -github.com/muety/wakapi/models/leaderboard.go:56.123,58.3 1 0 -github.com/muety/wakapi/models/leaderboard.go:61.50,63.2 1 0 -github.com/muety/wakapi/models/leaderboard.go:65.65,66.95 1 0 -github.com/muety/wakapi/models/leaderboard.go:66.95,68.3 1 0 -github.com/muety/wakapi/models/leaderboard.go:71.49,79.25 3 0 -github.com/muety/wakapi/models/leaderboard.go:79.25,80.58 1 0 -github.com/muety/wakapi/models/leaderboard.go:80.58,81.12 1 0 -github.com/muety/wakapi/models/leaderboard.go:83.3,84.38 2 0 -github.com/muety/wakapi/models/leaderboard.go:84.38,86.4 1 0 -github.com/muety/wakapi/models/leaderboard.go:87.3,87.40 1 0 -github.com/muety/wakapi/models/leaderboard.go:90.2,90.129 1 0 -github.com/muety/wakapi/models/leaderboard.go:90.129,92.3 1 0 -github.com/muety/wakapi/models/leaderboard.go:93.2,93.67 1 0 -github.com/muety/wakapi/models/leaderboard.go:93.67,95.3 1 0 -github.com/muety/wakapi/models/leaderboard.go:97.2,97.79 1 0 -github.com/muety/wakapi/models/leaderboard.go:97.79,99.3 1 0 -github.com/muety/wakapi/models/leaderboard.go:102.70,103.107 1 0 -github.com/muety/wakapi/models/leaderboard.go:103.107,105.3 1 0 -github.com/muety/wakapi/models/leaderboard.go:108.45,110.25 2 0 -github.com/muety/wakapi/models/leaderboard.go:110.25,111.43 1 0 -github.com/muety/wakapi/models/leaderboard.go:111.43,113.4 1 0 -github.com/muety/wakapi/models/leaderboard.go:115.2,115.19 1 0 +github.com/muety/wakapi/models/leaderboard.go:39.56,40.103 1 0 +github.com/muety/wakapi/models/leaderboard.go:40.103,42.3 1 0 +github.com/muety/wakapi/models/leaderboard.go:42.13,44.3 1 0 +github.com/muety/wakapi/models/leaderboard.go:47.63,48.29 1 0 +github.com/muety/wakapi/models/leaderboard.go:48.29,50.3 1 0 +github.com/muety/wakapi/models/leaderboard.go:54.37,55.94 1 0 +github.com/muety/wakapi/models/leaderboard.go:55.94,57.3 1 0 +github.com/muety/wakapi/models/leaderboard.go:60.41,61.123 1 0 +github.com/muety/wakapi/models/leaderboard.go:61.123,63.3 1 0 +github.com/muety/wakapi/models/leaderboard.go:66.50,68.2 1 0 +github.com/muety/wakapi/models/leaderboard.go:71.60,72.109 1 0 +github.com/muety/wakapi/models/leaderboard.go:72.109,74.3 1 0 +github.com/muety/wakapi/models/leaderboard.go:75.2,75.15 1 0 +github.com/muety/wakapi/models/leaderboard.go:78.65,79.95 1 0 +github.com/muety/wakapi/models/leaderboard.go:79.95,81.3 1 0 +github.com/muety/wakapi/models/leaderboard.go:84.49,85.114 1 0 +github.com/muety/wakapi/models/leaderboard.go:85.114,87.3 1 0 +github.com/muety/wakapi/models/leaderboard.go:90.68,93.25 2 0 +github.com/muety/wakapi/models/leaderboard.go:93.25,94.58 1 0 +github.com/muety/wakapi/models/leaderboard.go:94.58,95.12 1 0 +github.com/muety/wakapi/models/leaderboard.go:97.3,98.38 2 0 +github.com/muety/wakapi/models/leaderboard.go:98.38,100.4 1 0 +github.com/muety/wakapi/models/leaderboard.go:101.3,101.40 1 0 +github.com/muety/wakapi/models/leaderboard.go:104.2,104.184 1 0 +github.com/muety/wakapi/models/leaderboard.go:104.184,106.3 1 0 +github.com/muety/wakapi/models/leaderboard.go:107.2,107.67 1 0 +github.com/muety/wakapi/models/leaderboard.go:107.67,109.3 1 0 +github.com/muety/wakapi/models/leaderboard.go:111.2,111.15 1 0 +github.com/muety/wakapi/models/leaderboard.go:114.70,115.128 1 0 +github.com/muety/wakapi/models/leaderboard.go:115.128,117.3 1 0 +github.com/muety/wakapi/models/leaderboard.go:120.89,121.107 1 0 +github.com/muety/wakapi/models/leaderboard.go:121.107,123.3 1 0 +github.com/muety/wakapi/models/leaderboard.go:126.45,128.25 2 0 +github.com/muety/wakapi/models/leaderboard.go:128.25,129.43 1 0 +github.com/muety/wakapi/models/leaderboard.go:129.43,131.4 1 0 +github.com/muety/wakapi/models/leaderboard.go:133.2,133.19 1 0 github.com/muety/wakapi/models/mail.go:23.44,27.2 3 0 github.com/muety/wakapi/models/mail.go:29.44,33.2 3 0 github.com/muety/wakapi/models/mail.go:35.34,36.18 1 0 @@ -1131,6 +788,389 @@ github.com/muety/wakapi/models/user.go:191.45,193.2 1 0 github.com/muety/wakapi/models/user.go:195.45,197.2 1 0 github.com/muety/wakapi/models/user.go:200.39,202.2 1 0 github.com/muety/wakapi/models/user.go:204.39,207.2 2 0 +github.com/muety/wakapi/routes/api/activity.go:22.126,28.2 1 0 +github.com/muety/wakapi/routes/api/activity.go:30.64,39.2 4 0 +github.com/muety/wakapi/routes/api/activity.go:41.87,44.16 3 0 +github.com/muety/wakapi/routes/api/activity.go:44.16,47.3 2 0 +github.com/muety/wakapi/routes/api/activity.go:49.2,49.68 1 0 +github.com/muety/wakapi/routes/api/activity.go:49.68,50.159 1 0 +github.com/muety/wakapi/routes/api/activity.go:50.159,53.4 2 0 +github.com/muety/wakapi/routes/api/activity.go:56.2,60.16 4 0 +github.com/muety/wakapi/routes/api/activity.go:60.16,64.3 3 0 +github.com/muety/wakapi/routes/api/activity.go:66.2,69.24 4 0 +github.com/muety/wakapi/routes/api/avatar.go:19.40,21.16 2 0 +github.com/muety/wakapi/routes/api/avatar.go:21.16,22.13 1 0 +github.com/muety/wakapi/routes/api/avatar.go:25.2,28.3 1 0 +github.com/muety/wakapi/routes/api/avatar.go:31.59,36.2 4 0 +github.com/muety/wakapi/routes/api/avatar.go:38.69,41.37 2 0 +github.com/muety/wakapi/routes/api/avatar.go:41.37,43.3 1 0 +github.com/muety/wakapi/routes/api/avatar.go:45.2,45.29 1 0 +github.com/muety/wakapi/routes/api/avatar.go:45.29,47.3 1 0 +github.com/muety/wakapi/routes/api/avatar.go:48.2,53.32 5 0 +github.com/muety/wakapi/routes/api/badge.go:28.112,35.2 1 1 +github.com/muety/wakapi/routes/api/badge.go:37.58,42.2 4 1 +github.com/muety/wakapi/routes/api/badge.go:44.68,47.16 3 1 +github.com/muety/wakapi/routes/api/badge.go:47.16,50.3 2 0 +github.com/muety/wakapi/routes/api/badge.go:52.2,53.16 2 1 +github.com/muety/wakapi/routes/api/badge.go:53.16,57.3 3 1 +github.com/muety/wakapi/routes/api/badge.go:59.2,61.62 3 1 +github.com/muety/wakapi/routes/api/badge.go:61.62,64.3 2 0 +github.com/muety/wakapi/routes/api/badge.go:66.2,74.16 3 1 +github.com/muety/wakapi/routes/api/badge.go:74.16,78.3 3 0 +github.com/muety/wakapi/routes/api/badge.go:80.2,81.66 2 1 +github.com/muety/wakapi/routes/api/badge.go:81.66,83.3 1 0 +github.com/muety/wakapi/routes/api/badge.go:84.2,84.66 1 1 +github.com/muety/wakapi/routes/api/badge.go:84.66,86.3 1 0 +github.com/muety/wakapi/routes/api/badge.go:88.2,88.101 1 1 +github.com/muety/wakapi/routes/api/badge.go:88.101,90.3 1 1 +github.com/muety/wakapi/routes/api/badge.go:92.2,94.25 3 1 +github.com/muety/wakapi/routes/api/badge.go:97.53,102.2 4 1 +github.com/muety/wakapi/routes/api/diagnostics.go:20.138,26.2 1 0 +github.com/muety/wakapi/routes/api/diagnostics.go:28.67,30.2 1 0 +github.com/muety/wakapi/routes/api/diagnostics.go:39.78,42.69 2 0 +github.com/muety/wakapi/routes/api/diagnostics.go:42.69,47.3 4 0 +github.com/muety/wakapi/routes/api/diagnostics.go:49.2,49.66 1 0 +github.com/muety/wakapi/routes/api/diagnostics.go:49.66,54.3 4 0 +github.com/muety/wakapi/routes/api/diagnostics.go:56.2,56.59 1 0 +github.com/muety/wakapi/routes/api/health.go:15.57,17.2 1 0 +github.com/muety/wakapi/routes/api/health.go:19.62,21.2 1 0 +github.com/muety/wakapi/routes/api/health.go:29.72,31.41 2 0 +github.com/muety/wakapi/routes/api/health.go:31.41,32.38 1 0 +github.com/muety/wakapi/routes/api/health.go:32.38,34.4 1 0 +github.com/muety/wakapi/routes/api/health.go:37.2,38.56 2 0 +github.com/muety/wakapi/routes/api/heartbeat.go:26.187,33.2 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:39.65,40.34 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:40.34,54.3 9 0 +github.com/muety/wakapi/routes/api/heartbeat.go:65.76,67.16 2 0 +github.com/muety/wakapi/routes/api/heartbeat.go:67.16,69.3 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:71.2,73.16 3 0 +github.com/muety/wakapi/routes/api/heartbeat.go:73.16,78.3 4 0 +github.com/muety/wakapi/routes/api/heartbeat.go:80.2,84.32 4 0 +github.com/muety/wakapi/routes/api/heartbeat.go:84.32,85.16 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:85.16,89.4 3 0 +github.com/muety/wakapi/routes/api/heartbeat.go:92.3,92.25 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:92.25,97.4 4 0 +github.com/muety/wakapi/routes/api/heartbeat.go:98.3,98.23 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:98.23,100.4 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:102.3,102.37 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:102.37,103.150 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:103.150,105.5 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:108.3,115.65 7 0 +github.com/muety/wakapi/routes/api/heartbeat.go:115.65,119.4 3 0 +github.com/muety/wakapi/routes/api/heartbeat.go:121.3,121.14 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:124.2,124.64 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:124.64,129.3 4 0 +github.com/muety/wakapi/routes/api/heartbeat.go:131.2,131.19 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:131.19,133.52 2 0 +github.com/muety/wakapi/routes/api/heartbeat.go:133.52,138.4 4 0 +github.com/muety/wakapi/routes/api/heartbeat.go:141.2,141.15 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:141.16,141.17 0 0 +github.com/muety/wakapi/routes/api/heartbeat.go:143.2,143.90 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:152.59,155.25 2 0 +github.com/muety/wakapi/routes/api/heartbeat.go:155.25,160.3 4 0 +github.com/muety/wakapi/routes/api/heartbeat.go:162.2,164.3 1 0 +github.com/muety/wakapi/routes/api/heartbeat.go:178.45,178.46 0 0 +github.com/muety/wakapi/routes/api/heartbeat.go:189.45,189.46 0 0 +github.com/muety/wakapi/routes/api/heartbeat.go:200.45,200.46 0 0 +github.com/muety/wakapi/routes/api/heartbeat.go:210.45,210.46 0 0 +github.com/muety/wakapi/routes/api/heartbeat.go:221.45,221.46 0 0 +github.com/muety/wakapi/routes/api/heartbeat.go:232.45,232.46 0 0 +github.com/muety/wakapi/routes/api/heartbeat.go:243.45,243.46 0 0 +github.com/muety/wakapi/routes/api/metrics.go:64.249,73.2 1 0 +github.com/muety/wakapi/routes/api/metrics.go:75.60,76.38 1 0 +github.com/muety/wakapi/routes/api/metrics.go:76.38,78.3 1 0 +github.com/muety/wakapi/routes/api/metrics.go:80.2,86.29 5 0 +github.com/muety/wakapi/routes/api/metrics.go:89.70,91.20 2 0 +github.com/muety/wakapi/routes/api/metrics.go:91.20,95.3 3 0 +github.com/muety/wakapi/routes/api/metrics.go:97.2,99.63 2 0 +github.com/muety/wakapi/routes/api/metrics.go:99.63,104.3 4 0 +github.com/muety/wakapi/routes/api/metrics.go:104.8,105.34 1 0 +github.com/muety/wakapi/routes/api/metrics.go:105.34,107.4 1 0 +github.com/muety/wakapi/routes/api/metrics.go:110.2,110.21 1 0 +github.com/muety/wakapi/routes/api/metrics.go:110.21,111.66 1 0 +github.com/muety/wakapi/routes/api/metrics.go:111.66,116.4 4 0 +github.com/muety/wakapi/routes/api/metrics.go:116.9,117.36 1 0 +github.com/muety/wakapi/routes/api/metrics.go:117.36,119.5 1 0 +github.com/muety/wakapi/routes/api/metrics.go:123.2,126.34 3 0 +github.com/muety/wakapi/routes/api/metrics.go:129.81,133.16 3 0 +github.com/muety/wakapi/routes/api/metrics.go:133.16,136.3 2 0 +github.com/muety/wakapi/routes/api/metrics.go:138.2,141.16 3 0 +github.com/muety/wakapi/routes/api/metrics.go:141.16,144.3 2 0 +github.com/muety/wakapi/routes/api/metrics.go:146.2,147.16 2 0 +github.com/muety/wakapi/routes/api/metrics.go:147.16,150.3 2 0 +github.com/muety/wakapi/routes/api/metrics.go:154.2,175.42 4 0 +github.com/muety/wakapi/routes/api/metrics.go:175.42,182.3 1 0 +github.com/muety/wakapi/routes/api/metrics.go:184.2,184.43 1 0 +github.com/muety/wakapi/routes/api/metrics.go:184.43,191.3 1 0 +github.com/muety/wakapi/routes/api/metrics.go:193.2,193.41 1 0 +github.com/muety/wakapi/routes/api/metrics.go:193.41,200.3 1 0 +github.com/muety/wakapi/routes/api/metrics.go:202.2,202.50 1 0 +github.com/muety/wakapi/routes/api/metrics.go:202.50,209.3 1 0 +github.com/muety/wakapi/routes/api/metrics.go:211.2,211.42 1 0 +github.com/muety/wakapi/routes/api/metrics.go:211.42,218.3 1 0 +github.com/muety/wakapi/routes/api/metrics.go:220.2,220.40 1 0 +github.com/muety/wakapi/routes/api/metrics.go:220.40,227.3 1 0 +github.com/muety/wakapi/routes/api/metrics.go:230.2,270.16 9 0 +github.com/muety/wakapi/routes/api/metrics.go:270.16,272.3 1 0 +github.com/muety/wakapi/routes/api/metrics.go:274.2,282.44 2 0 +github.com/muety/wakapi/routes/api/metrics.go:282.44,296.3 2 0 +github.com/muety/wakapi/routes/api/metrics.go:298.2,298.22 1 0 +github.com/muety/wakapi/routes/api/metrics.go:301.82,307.19 4 0 +github.com/muety/wakapi/routes/api/metrics.go:307.19,309.3 1 0 +github.com/muety/wakapi/routes/api/metrics.go:311.2,312.106 2 0 +github.com/muety/wakapi/routes/api/metrics.go:312.106,313.56 1 0 +github.com/muety/wakapi/routes/api/metrics.go:313.56,315.4 1 0 +github.com/muety/wakapi/routes/api/metrics.go:318.2,323.16 5 0 +github.com/muety/wakapi/routes/api/metrics.go:323.16,326.3 2 0 +github.com/muety/wakapi/routes/api/metrics.go:327.2,360.16 7 0 +github.com/muety/wakapi/routes/api/metrics.go:360.16,363.3 2 0 +github.com/muety/wakapi/routes/api/metrics.go:365.2,365.32 1 0 +github.com/muety/wakapi/routes/api/metrics.go:365.32,372.3 1 0 +github.com/muety/wakapi/routes/api/metrics.go:373.2,383.29 6 0 +github.com/muety/wakapi/routes/api/metrics.go:383.29,384.20 1 0 +github.com/muety/wakapi/routes/api/metrics.go:384.20,386.18 2 0 +github.com/muety/wakapi/routes/api/metrics.go:386.18,389.5 2 0 +github.com/muety/wakapi/routes/api/metrics.go:390.4,397.6 3 0 +github.com/muety/wakapi/routes/api/metrics.go:401.2,404.22 3 0 +github.com/muety/wakapi/routes/api/summary.go:20.122,26.2 1 0 +github.com/muety/wakapi/routes/api/summary.go:28.63,34.2 4 0 +github.com/muety/wakapi/routes/api/summary.go:53.73,55.16 2 0 +github.com/muety/wakapi/routes/api/summary.go:55.16,59.3 3 0 +github.com/muety/wakapi/routes/api/summary.go:61.2,61.51 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:23.116,29.2 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:31.60,32.34 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:32.34,35.3 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:47.70,49.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:49.16,51.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:53.2,54.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:54.16,58.3 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:60.2,61.46 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:64.116,73.29 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:73.29,75.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:77.2,85.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:85.16,87.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/all_time.go:89.2,89.36 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:29.124,34.2 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:36.62,37.34 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:37.34,40.3 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:52.72,54.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:54.16,56.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:58.2,61.16 4 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:61.16,65.3 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:67.2,71.16 4 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:71.16,76.3 4 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/heartbeat.go:78.2,84.47 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:26.124,32.2 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:34.60,35.34 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:35.34,38.3 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:49.70,55.63 5 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:55.63,56.26 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:56.26,58.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:58.9,60.18 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:60.18,62.5 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:63.4,63.19 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:67.2,67.67 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:67.67,68.18 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:68.18,70.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:71.3,71.26 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:71.26,73.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:73.9,75.18 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:75.18,77.5 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:78.4,78.19 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:82.2,83.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:83.16,88.3 4 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:89.2,92.16 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:92.16,97.3 4 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:100.2,100.57 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:100.57,101.57 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:101.57,103.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:103.9,105.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:109.2,111.46 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:114.200,116.17 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:116.17,118.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:120.2,140.32 6 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:140.32,146.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:148.2,148.42 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:148.42,158.219 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:158.219,163.6 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/leaders.go:169.2,169.11 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:27.123,33.2 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:35.61,36.34 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:36.34,40.3 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:53.71,55.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:55.16,57.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:59.2,60.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:60.16,65.3 4 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:67.2,68.46 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:81.74,83.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:83.16,85.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:87.2,88.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:88.16,93.3 4 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:95.2,95.24 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:95.24,99.3 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:101.2,102.46 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:105.104,107.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:107.16,109.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:111.2,112.28 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:112.28,113.79 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:113.79,122.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/projects.go:125.2,125.22 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:23.112,29.2 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:31.58,32.34 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:32.34,42.3 5 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:63.68,69.53 5 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:69.53,71.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:73.2,74.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:74.16,78.3 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:82.2,82.22 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:82.22,83.100 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:83.100,85.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:85.9,87.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:90.2,91.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:91.16,95.3 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:97.2,99.69 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:99.69,103.3 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:105.2,106.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:106.16,110.3 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:112.2,118.68 6 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:118.68,120.34 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:120.34,122.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:123.3,123.36 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:123.36,125.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:126.3,126.35 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:126.35,128.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:129.3,129.30 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:129.30,131.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:132.3,132.35 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:132.35,134.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:137.2,137.49 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:140.136,149.16 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:149.16,151.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/stats.go:153.2,153.36 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:29.120,35.2 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:37.62,38.34 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:38.34,43.3 4 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:55.72,57.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:57.16,59.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:61.2,62.22 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:62.22,64.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:66.2,67.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:67.16,71.3 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:73.2,74.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:74.16,78.3 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:79.2,83.4 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:86.115,95.29 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:95.29,97.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:99.2,100.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:100.16,102.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/statusbar.go:104.2,104.36 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:27.120,33.2 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:35.62,36.34 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:36.34,39.3 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:65.72,67.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:67.16,69.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:71.2,72.16 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:72.16,76.3 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:78.2,79.46 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:82.114,87.19 4 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:87.19,88.56 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:88.56,90.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:93.2,94.22 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:94.22,96.98 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:96.98,98.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:98.9,100.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:101.8,101.130 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:101.130,104.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:104.8,109.17 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:109.17,111.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:113.3,114.17 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:114.17,116.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:123.2,125.23 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:125.23,127.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:129.2,141.37 5 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:141.37,143.17 2 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:143.17,145.4 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:147.3,149.25 3 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/summaries.go:152.2,152.38 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:21.116,27.2 1 1 +github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:29.58,30.34 1 1 +github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:30.34,33.3 2 1 +github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:45.68,47.16 2 1 +github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:47.16,49.3 1 1 +github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:51.2,52.72 2 1 +github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:52.72,54.3 1 1 +github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:54.8,56.3 1 0 +github.com/muety/wakapi/routes/compat/wakatime/v1/users.go:58.2,58.72 1 1 +github.com/muety/wakapi/routes/utils/badge_utils.go:20.13,23.2 2 1 +github.com/muety/wakapi/routes/utils/badge_utils.go:25.129,29.76 3 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:29.76,31.3 1 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:33.2,34.72 2 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:34.72,35.61 1 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:35.61,37.4 1 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:40.2,48.86 4 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:48.86,50.3 1 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:52.2,54.22 3 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:55.17,57.68 2 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:58.12,60.63 2 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:61.16,63.67 2 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:64.18,66.69 2 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:67.17,69.68 2 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:70.15,72.66 2 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:74.10,77.30 2 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:80.2,80.34 1 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:80.34,82.3 1 0 +github.com/muety/wakapi/routes/utils/badge_utils.go:84.2,84.31 1 0 +github.com/muety/wakapi/routes/utils/heartbeat_utils.go:11.68,13.16 2 0 +github.com/muety/wakapi/routes/utils/heartbeat_utils.go:13.16,15.3 1 0 +github.com/muety/wakapi/routes/utils/heartbeat_utils.go:17.2,18.16 2 0 +github.com/muety/wakapi/routes/utils/heartbeat_utils.go:18.16,20.3 1 0 +github.com/muety/wakapi/routes/utils/heartbeat_utils.go:22.2,22.35 1 0 +github.com/muety/wakapi/routes/utils/heartbeat_utils.go:25.65,33.48 6 0 +github.com/muety/wakapi/routes/utils/heartbeat_utils.go:33.48,35.3 1 0 +github.com/muety/wakapi/routes/utils/heartbeat_utils.go:37.2,37.24 1 0 +github.com/muety/wakapi/routes/utils/heartbeat_utils.go:40.67,48.47 6 0 +github.com/muety/wakapi/routes/utils/heartbeat_utils.go:48.47,50.3 1 0 +github.com/muety/wakapi/routes/utils/heartbeat_utils.go:52.2,52.45 1 0 +github.com/muety/wakapi/routes/utils/messages.go:9.71,11.2 1 0 +github.com/muety/wakapi/routes/utils/messages.go:13.73,15.2 1 0 +github.com/muety/wakapi/routes/utils/messages.go:17.97,19.57 2 0 +github.com/muety/wakapi/routes/utils/messages.go:19.57,21.3 1 0 +github.com/muety/wakapi/routes/utils/messages.go:22.2,22.65 1 0 +github.com/muety/wakapi/routes/utils/messages.go:22.65,24.3 1 0 +github.com/muety/wakapi/routes/utils/messages.go:25.2,26.11 2 0 +github.com/muety/wakapi/routes/utils/messages.go:29.78,33.2 3 0 +github.com/muety/wakapi/routes/utils/project_utils.go:15.144,18.16 2 0 +github.com/muety/wakapi/routes/utils/project_utils.go:18.16,20.3 1 0 +github.com/muety/wakapi/routes/utils/project_utils.go:23.2,24.16 2 0 +github.com/muety/wakapi/routes/utils/project_utils.go:24.16,26.3 1 0 +github.com/muety/wakapi/routes/utils/project_utils.go:28.2,32.35 2 0 +github.com/muety/wakapi/routes/utils/project_utils.go:32.35,35.3 2 0 +github.com/muety/wakapi/routes/utils/project_utils.go:37.2,39.20 3 0 +github.com/muety/wakapi/routes/utils/summary_utils.go:12.98,14.16 2 0 +github.com/muety/wakapi/routes/utils/summary_utils.go:14.16,16.3 1 0 +github.com/muety/wakapi/routes/utils/summary_utils.go:17.2,17.51 1 0 +github.com/muety/wakapi/routes/utils/summary_utils.go:20.119,22.22 2 0 +github.com/muety/wakapi/routes/utils/summary_utils.go:22.22,24.3 1 0 +github.com/muety/wakapi/routes/utils/summary_utils.go:26.2,34.16 2 0 +github.com/muety/wakapi/routes/utils/summary_utils.go:34.16,36.3 1 0 +github.com/muety/wakapi/routes/utils/summary_utils.go:38.2,41.36 3 0 +github.com/muety/wakapi/routes/utils/summary_utils.go:44.90,46.32 2 0 +github.com/muety/wakapi/routes/utils/summary_utils.go:46.32,47.50 1 0 +github.com/muety/wakapi/routes/utils/summary_utils.go:47.50,49.4 1 0 +github.com/muety/wakapi/routes/utils/summary_utils.go:51.2,51.15 1 0 +github.com/muety/wakapi/routes/utils/user_utils.go:15.139,16.68 1 1 +github.com/muety/wakapi/routes/utils/user_utils.go:16.68,21.3 4 1 +github.com/muety/wakapi/routes/utils/user_utils.go:23.2,24.21 2 1 +github.com/muety/wakapi/routes/utils/user_utils.go:24.21,26.3 1 1 +github.com/muety/wakapi/routes/utils/user_utils.go:28.2,29.27 2 1 +github.com/muety/wakapi/routes/utils/user_utils.go:29.27,31.3 1 1 +github.com/muety/wakapi/routes/utils/user_utils.go:31.8,31.35 1 1 +github.com/muety/wakapi/routes/utils/user_utils.go:31.35,33.3 1 1 +github.com/muety/wakapi/routes/utils/user_utils.go:35.2,35.63 1 1 +github.com/muety/wakapi/routes/utils/user_utils.go:35.63,37.3 1 1 +github.com/muety/wakapi/routes/utils/user_utils.go:39.2,40.16 2 1 +github.com/muety/wakapi/routes/utils/user_utils.go:40.16,42.3 1 0 +github.com/muety/wakapi/routes/utils/user_utils.go:44.2,44.27 1 1 github.com/muety/wakapi/utils/auth.go:15.79,17.54 2 0 github.com/muety/wakapi/utils/auth.go:17.54,19.3 1 0 github.com/muety/wakapi/utils/auth.go:21.2,23.16 3 0 @@ -1619,88 +1659,88 @@ github.com/muety/wakapi/services/language_mapping.go:66.82,67.26 1 0 github.com/muety/wakapi/services/language_mapping.go:67.26,69.3 1 0 github.com/muety/wakapi/services/language_mapping.go:70.2,72.12 3 0 github.com/muety/wakapi/services/language_mapping.go:75.74,78.2 1 0 -github.com/muety/wakapi/services/leaderboard.go:31.159,44.16 3 0 -github.com/muety/wakapi/services/leaderboard.go:44.16,46.3 1 0 -github.com/muety/wakapi/services/leaderboard.go:47.2,50.33 3 0 -github.com/muety/wakapi/services/leaderboard.go:50.33,51.31 1 0 -github.com/muety/wakapi/services/leaderboard.go:51.31,57.18 3 0 -github.com/muety/wakapi/services/leaderboard.go:57.18,59.5 1 0 -github.com/muety/wakapi/services/leaderboard.go:61.4,61.41 1 0 -github.com/muety/wakapi/services/leaderboard.go:61.41,64.5 2 0 -github.com/muety/wakapi/services/leaderboard.go:64.10,64.48 1 0 -github.com/muety/wakapi/services/leaderboard.go:64.48,66.64 2 0 -github.com/muety/wakapi/services/leaderboard.go:66.64,68.6 1 0 -github.com/muety/wakapi/services/leaderboard.go:69.5,69.22 1 0 -github.com/muety/wakapi/services/leaderboard.go:74.2,74.12 1 0 -github.com/muety/wakapi/services/leaderboard.go:77.70,79.2 1 0 -github.com/muety/wakapi/services/leaderboard.go:81.43,84.21 2 0 -github.com/muety/wakapi/services/leaderboard.go:84.21,86.17 2 0 -github.com/muety/wakapi/services/leaderboard.go:86.17,89.4 2 0 -github.com/muety/wakapi/services/leaderboard.go:90.3,90.83 1 0 -github.com/muety/wakapi/services/leaderboard.go:93.2,93.76 1 0 -github.com/muety/wakapi/services/leaderboard.go:93.76,94.77 1 0 -github.com/muety/wakapi/services/leaderboard.go:94.77,96.4 1 0 -github.com/muety/wakapi/services/leaderboard.go:100.121,103.29 2 0 -github.com/muety/wakapi/services/leaderboard.go:103.29,104.83 1 0 -github.com/muety/wakapi/services/leaderboard.go:104.83,106.12 2 0 -github.com/muety/wakapi/services/leaderboard.go:109.3,110.17 2 0 -github.com/muety/wakapi/services/leaderboard.go:110.17,112.12 2 0 -github.com/muety/wakapi/services/leaderboard.go:115.3,115.85 1 0 -github.com/muety/wakapi/services/leaderboard.go:115.85,117.12 2 0 -github.com/muety/wakapi/services/leaderboard.go:120.3,120.25 1 0 -github.com/muety/wakapi/services/leaderboard.go:120.25,122.18 2 0 -github.com/muety/wakapi/services/leaderboard.go:122.18,124.13 2 0 -github.com/muety/wakapi/services/leaderboard.go:127.4,127.23 1 0 -github.com/muety/wakapi/services/leaderboard.go:127.23,128.13 1 0 -github.com/muety/wakapi/services/leaderboard.go:131.4,131.60 1 0 -github.com/muety/wakapi/services/leaderboard.go:131.60,133.13 2 0 -github.com/muety/wakapi/services/leaderboard.go:138.2,140.12 3 0 -github.com/muety/wakapi/services/leaderboard.go:143.77,146.2 2 0 -github.com/muety/wakapi/services/leaderboard.go:148.60,151.52 2 0 -github.com/muety/wakapi/services/leaderboard.go:151.52,153.3 1 0 -github.com/muety/wakapi/services/leaderboard.go:155.2,156.16 2 0 -github.com/muety/wakapi/services/leaderboard.go:156.16,158.3 1 0 -github.com/muety/wakapi/services/leaderboard.go:159.2,159.19 1 0 -github.com/muety/wakapi/services/leaderboard.go:162.153,164.2 1 0 -github.com/muety/wakapi/services/leaderboard.go:166.144,168.2 1 0 -github.com/muety/wakapi/services/leaderboard.go:170.174,173.52 2 0 -github.com/muety/wakapi/services/leaderboard.go:173.52,175.3 1 0 -github.com/muety/wakapi/services/leaderboard.go:177.2,178.16 2 0 -github.com/muety/wakapi/services/leaderboard.go:178.16,180.3 1 0 -github.com/muety/wakapi/services/leaderboard.go:182.2,182.18 1 0 -github.com/muety/wakapi/services/leaderboard.go:182.18,184.17 2 0 -github.com/muety/wakapi/services/leaderboard.go:184.17,186.4 1 0 -github.com/muety/wakapi/services/leaderboard.go:186.9,187.31 1 0 -github.com/muety/wakapi/services/leaderboard.go:187.31,188.40 1 0 -github.com/muety/wakapi/services/leaderboard.go:188.40,190.6 1 0 -github.com/muety/wakapi/services/leaderboard.go:195.2,196.19 2 0 -github.com/muety/wakapi/services/leaderboard.go:199.165,202.52 2 0 -github.com/muety/wakapi/services/leaderboard.go:202.52,204.3 1 0 -github.com/muety/wakapi/services/leaderboard.go:206.2,207.16 2 0 -github.com/muety/wakapi/services/leaderboard.go:207.16,209.3 1 0 -github.com/muety/wakapi/services/leaderboard.go:211.2,211.17 1 0 -github.com/muety/wakapi/services/leaderboard.go:211.17,213.17 2 0 -github.com/muety/wakapi/services/leaderboard.go:213.17,215.4 1 0 -github.com/muety/wakapi/services/leaderboard.go:215.9,216.31 1 0 -github.com/muety/wakapi/services/leaderboard.go:216.31,218.5 1 0 -github.com/muety/wakapi/services/leaderboard.go:222.2,223.19 2 0 -github.com/muety/wakapi/services/leaderboard.go:226.129,228.16 2 0 -github.com/muety/wakapi/services/leaderboard.go:228.16,230.3 1 0 -github.com/muety/wakapi/services/leaderboard.go:232.2,233.16 2 0 -github.com/muety/wakapi/services/leaderboard.go:233.16,235.3 1 0 -github.com/muety/wakapi/services/leaderboard.go:238.2,244.8 2 0 -github.com/muety/wakapi/services/leaderboard.go:247.151,249.16 2 0 -github.com/muety/wakapi/services/leaderboard.go:249.16,251.3 1 0 -github.com/muety/wakapi/services/leaderboard.go:253.2,254.16 2 0 -github.com/muety/wakapi/services/leaderboard.go:254.16,256.3 1 0 -github.com/muety/wakapi/services/leaderboard.go:258.2,261.42 3 0 -github.com/muety/wakapi/services/leaderboard.go:261.42,271.3 2 0 -github.com/muety/wakapi/services/leaderboard.go:273.2,273.19 1 0 -github.com/muety/wakapi/services/leaderboard.go:276.131,278.47 2 0 -github.com/muety/wakapi/services/leaderboard.go:278.47,280.3 1 0 -github.com/muety/wakapi/services/leaderboard.go:281.2,281.23 1 0 -github.com/muety/wakapi/services/leaderboard.go:281.23,283.3 1 0 -github.com/muety/wakapi/services/leaderboard.go:284.2,284.10 1 0 +github.com/muety/wakapi/services/leaderboard.go:32.159,45.16 3 0 +github.com/muety/wakapi/services/leaderboard.go:45.16,47.3 1 0 +github.com/muety/wakapi/services/leaderboard.go:48.2,51.33 3 0 +github.com/muety/wakapi/services/leaderboard.go:51.33,52.31 1 0 +github.com/muety/wakapi/services/leaderboard.go:52.31,58.18 3 0 +github.com/muety/wakapi/services/leaderboard.go:58.18,60.5 1 0 +github.com/muety/wakapi/services/leaderboard.go:62.4,62.41 1 0 +github.com/muety/wakapi/services/leaderboard.go:62.41,65.5 2 0 +github.com/muety/wakapi/services/leaderboard.go:65.10,65.48 1 0 +github.com/muety/wakapi/services/leaderboard.go:65.48,67.64 2 0 +github.com/muety/wakapi/services/leaderboard.go:67.64,69.6 1 0 +github.com/muety/wakapi/services/leaderboard.go:70.5,70.22 1 0 +github.com/muety/wakapi/services/leaderboard.go:75.2,75.12 1 0 +github.com/muety/wakapi/services/leaderboard.go:78.70,80.2 1 0 +github.com/muety/wakapi/services/leaderboard.go:82.43,85.21 2 0 +github.com/muety/wakapi/services/leaderboard.go:85.21,87.17 2 0 +github.com/muety/wakapi/services/leaderboard.go:87.17,90.4 2 0 +github.com/muety/wakapi/services/leaderboard.go:91.3,91.83 1 0 +github.com/muety/wakapi/services/leaderboard.go:94.2,94.76 1 0 +github.com/muety/wakapi/services/leaderboard.go:94.76,95.77 1 0 +github.com/muety/wakapi/services/leaderboard.go:95.77,97.4 1 0 +github.com/muety/wakapi/services/leaderboard.go:101.121,104.29 2 0 +github.com/muety/wakapi/services/leaderboard.go:104.29,105.83 1 0 +github.com/muety/wakapi/services/leaderboard.go:105.83,107.12 2 0 +github.com/muety/wakapi/services/leaderboard.go:110.3,111.17 2 0 +github.com/muety/wakapi/services/leaderboard.go:111.17,113.12 2 0 +github.com/muety/wakapi/services/leaderboard.go:116.3,116.85 1 0 +github.com/muety/wakapi/services/leaderboard.go:116.85,118.12 2 0 +github.com/muety/wakapi/services/leaderboard.go:121.3,121.25 1 0 +github.com/muety/wakapi/services/leaderboard.go:121.25,123.18 2 0 +github.com/muety/wakapi/services/leaderboard.go:123.18,125.13 2 0 +github.com/muety/wakapi/services/leaderboard.go:128.4,128.23 1 0 +github.com/muety/wakapi/services/leaderboard.go:128.23,129.13 1 0 +github.com/muety/wakapi/services/leaderboard.go:132.4,132.60 1 0 +github.com/muety/wakapi/services/leaderboard.go:132.60,134.13 2 0 +github.com/muety/wakapi/services/leaderboard.go:139.2,141.12 3 0 +github.com/muety/wakapi/services/leaderboard.go:144.77,147.2 2 0 +github.com/muety/wakapi/services/leaderboard.go:149.76,152.52 2 0 +github.com/muety/wakapi/services/leaderboard.go:152.52,154.3 1 0 +github.com/muety/wakapi/services/leaderboard.go:156.2,157.16 2 0 +github.com/muety/wakapi/services/leaderboard.go:157.16,159.3 1 0 +github.com/muety/wakapi/services/leaderboard.go:160.2,160.19 1 0 +github.com/muety/wakapi/services/leaderboard.go:163.153,165.2 1 0 +github.com/muety/wakapi/services/leaderboard.go:167.144,169.2 1 0 +github.com/muety/wakapi/services/leaderboard.go:171.174,174.52 2 0 +github.com/muety/wakapi/services/leaderboard.go:174.52,176.3 1 0 +github.com/muety/wakapi/services/leaderboard.go:178.2,179.16 2 0 +github.com/muety/wakapi/services/leaderboard.go:179.16,181.3 1 0 +github.com/muety/wakapi/services/leaderboard.go:183.2,183.18 1 0 +github.com/muety/wakapi/services/leaderboard.go:183.18,185.17 2 0 +github.com/muety/wakapi/services/leaderboard.go:185.17,187.4 1 0 +github.com/muety/wakapi/services/leaderboard.go:187.9,188.31 1 0 +github.com/muety/wakapi/services/leaderboard.go:188.31,189.40 1 0 +github.com/muety/wakapi/services/leaderboard.go:189.40,191.6 1 0 +github.com/muety/wakapi/services/leaderboard.go:196.2,197.19 2 0 +github.com/muety/wakapi/services/leaderboard.go:200.165,203.52 2 0 +github.com/muety/wakapi/services/leaderboard.go:203.52,205.3 1 0 +github.com/muety/wakapi/services/leaderboard.go:207.2,208.16 2 0 +github.com/muety/wakapi/services/leaderboard.go:208.16,210.3 1 0 +github.com/muety/wakapi/services/leaderboard.go:212.2,212.17 1 0 +github.com/muety/wakapi/services/leaderboard.go:212.17,214.17 2 0 +github.com/muety/wakapi/services/leaderboard.go:214.17,216.4 1 0 +github.com/muety/wakapi/services/leaderboard.go:216.9,217.31 1 0 +github.com/muety/wakapi/services/leaderboard.go:217.31,219.5 1 0 +github.com/muety/wakapi/services/leaderboard.go:223.2,224.19 2 0 +github.com/muety/wakapi/services/leaderboard.go:227.129,229.16 2 0 +github.com/muety/wakapi/services/leaderboard.go:229.16,231.3 1 0 +github.com/muety/wakapi/services/leaderboard.go:233.2,234.16 2 0 +github.com/muety/wakapi/services/leaderboard.go:234.16,236.3 1 0 +github.com/muety/wakapi/services/leaderboard.go:239.2,245.8 2 0 +github.com/muety/wakapi/services/leaderboard.go:248.151,250.16 2 0 +github.com/muety/wakapi/services/leaderboard.go:250.16,252.3 1 0 +github.com/muety/wakapi/services/leaderboard.go:254.2,255.16 2 0 +github.com/muety/wakapi/services/leaderboard.go:255.16,257.3 1 0 +github.com/muety/wakapi/services/leaderboard.go:259.2,262.42 3 0 +github.com/muety/wakapi/services/leaderboard.go:262.42,272.3 2 0 +github.com/muety/wakapi/services/leaderboard.go:274.2,274.19 1 0 +github.com/muety/wakapi/services/leaderboard.go:277.131,279.47 2 0 +github.com/muety/wakapi/services/leaderboard.go:279.47,281.3 1 0 +github.com/muety/wakapi/services/leaderboard.go:282.2,282.23 1 0 +github.com/muety/wakapi/services/leaderboard.go:282.23,284.3 1 0 +github.com/muety/wakapi/services/leaderboard.go:285.2,285.10 1 0 github.com/muety/wakapi/services/misc.go:44.188,56.2 1 0 github.com/muety/wakapi/services/misc.go:58.36,60.95 2 0 github.com/muety/wakapi/services/misc.go:60.95,62.3 1 0 diff --git a/middlewares/authenticate.go b/middlewares/authenticate.go index 0b5ad078..f8d6c8a7 100644 --- a/middlewares/authenticate.go +++ b/middlewares/authenticate.go @@ -40,7 +40,7 @@ func NewAuthenticateMiddleware(userService services.IUserService) *AuthenticateM } } -func (m *AuthenticateMiddleware) WithOptionalFor(paths []string) *AuthenticateMiddleware { +func (m *AuthenticateMiddleware) WithOptionalFor(paths ...string) *AuthenticateMiddleware { m.optionalForPaths = paths return m } diff --git a/routes/api/activity.go b/routes/api/activity.go index 9d489718..719fe6cb 100644 --- a/routes/api/activity.go +++ b/routes/api/activity.go @@ -30,7 +30,7 @@ func NewActivityApiHandler(userService services.IUserService, activityService se func (h *ActivityApiHandler) RegisterRoutes(router chi.Router) { r := chi.NewRouter() r.Use( - middlewares.NewAuthenticateMiddleware(h.userService).WithOptionalFor([]string{"/api/activity/chart/"}).Handler, + middlewares.NewAuthenticateMiddleware(h.userService).WithOptionalFor("/api/activity/chart/").Handler, middleware.Compress(9, "image/svg+xml"), ) r.Get("/chart/{user}.svg", h.GetActivityChart) diff --git a/routes/api/badge.go b/routes/api/badge.go index 20d9f977..fb802e63 100644 --- a/routes/api/badge.go +++ b/routes/api/badge.go @@ -36,7 +36,7 @@ func NewBadgeHandler(userService services.IUserService, summaryService services. func (h *BadgeHandler) RegisterRoutes(router chi.Router) { r := chi.NewRouter() - r.Use(middlewares.NewAuthenticateMiddleware(h.userSrvc).WithOptionalFor([]string{"/api/badge/"}).Handler) + r.Use(middlewares.NewAuthenticateMiddleware(h.userSrvc).WithOptionalFor("/api/badge/").Handler) r.Get("/{user}/*", h.Get) router.Mount("/badge", r) } diff --git a/routes/compat/wakatime/v1/leaders.go b/routes/compat/wakatime/v1/leaders.go index 2537f1b1..48d2702d 100644 --- a/routes/compat/wakatime/v1/leaders.go +++ b/routes/compat/wakatime/v1/leaders.go @@ -33,7 +33,7 @@ func NewLeadersHandler(userService services.IUserService, leaderboardService ser func (h *LeadersHandler) RegisterRoutes(router chi.Router) { router.Group(func(r chi.Router) { - r.Use(middlewares.NewAuthenticateMiddleware(h.userSrvc).Handler) + r.Use(middlewares.NewAuthenticateMiddleware(h.userSrvc).WithOptionalFor("/").Handler) r.Get("/compat/wakatime/v1/leaders", h.Get) }) } @@ -65,6 +65,9 @@ func (h *LeadersHandler) Get(w http.ResponseWriter, r *http.Request) { } loadPrimaryUserLeaderboard := func() (models.Leaderboard, error) { + if user == nil { + return []*models.LeaderboardItemRanked{}, nil + } if languageParam == "" { return h.leaderboardSrvc.GetByIntervalAndUser(h.leaderboardSrvc.GetDefaultScope(), user.ID, true) } else { @@ -109,7 +112,10 @@ func (h *LeadersHandler) Get(w http.ResponseWriter, r *http.Request) { } func (h *LeadersHandler) buildViewModel(globalLeaderboard, languageLeaderboard models.Leaderboard, user *models.User, interval *models.IntervalKey, pageParams *utils.PageParams) *v1.LeadersViewModel { - currentUserGlobal := *globalLeaderboard.GetByUser(user.ID) + var currentUserGlobal []*models.LeaderboardItemRanked + if user != nil { + currentUserGlobal = *globalLeaderboard.GetByUser(user.ID) + } totalUsers, _ := h.leaderboardSrvc.CountUsers(true) totalPages := int(totalUsers/int64(pageParams.PageSize) + 1) diff --git a/routes/compat/wakatime/v1/stats.go b/routes/compat/wakatime/v1/stats.go index ee830cd2..1dfd1475 100644 --- a/routes/compat/wakatime/v1/stats.go +++ b/routes/compat/wakatime/v1/stats.go @@ -31,7 +31,7 @@ func NewStatsHandler(userService services.IUserService, summaryService services. func (h *StatsHandler) RegisterRoutes(router chi.Router) { router.Group(func(r chi.Router) { r.Use( - middlewares.NewAuthenticateMiddleware(h.userSrvc).WithOptionalFor([]string{"/"}).Handler, + middlewares.NewAuthenticateMiddleware(h.userSrvc).WithOptionalFor("/").Handler, ) r.Get("/v1/users/{user}/stats/{range}", h.Get) r.Get("/compat/wakatime/v1/users/{user}/stats/{range}", h.Get) diff --git a/routes/leaderboard.go b/routes/leaderboard.go index f3dee9bc..8e46932c 100644 --- a/routes/leaderboard.go +++ b/routes/leaderboard.go @@ -39,7 +39,7 @@ func (h *LeaderboardHandler) RegisterRoutes(router chi.Router) { middlewares.NewAuthenticateMiddleware(h.userService). WithRedirectTarget(defaultErrorRedirectTarget()). WithRedirectErrorMessage("unauthorized"). - WithOptionalFor([]string{"/"}).Handler, + WithOptionalFor("/").Handler, ) r.Get("/", h.GetIndex) diff --git a/routes/login.go b/routes/login.go index 51582d3b..d5a0d635 100644 --- a/routes/login.go +++ b/routes/login.go @@ -43,7 +43,7 @@ func (h *LoginHandler) RegisterRoutes(router chi.Router) { authMiddleware := middlewares.NewAuthenticateMiddleware(h.userSrvc). WithRedirectTarget(defaultErrorRedirectTarget()). WithRedirectErrorMessage("unauthorized"). - WithOptionalFor([]string{"/logout"}) + WithOptionalFor("/logout") logoutRouter := chi.NewRouter() logoutRouter.Use(authMiddleware.Handler)