diff --git a/logs/common.log b/logs/common.log new file mode 100644 index 00000000..5e23f687 --- /dev/null +++ b/logs/common.log @@ -0,0 +1,247 @@ +[SYS] 2023/05/20 - 10:50:07 | One API v0.0.0 started +[SYS] 2023/05/20 - 10:50:07 | SQL_DSN not set, using SQLite as database +[SYS] 2023/05/20 - 10:50:07 | no user exists, create a root user for you: username is root, password is 123456 +[SYS] 2023/05/20 - 10:50:07 | REDIS_CONN_STRING not set, Redis is not enabled +[GIN] 2023/05/20 - 10:50:12 | 200 | 12.859666ms | ::1 | GET "/" +[GIN] 2023/05/20 - 10:50:12 | 200 | 26.413125ms | ::1 | GET "/static/css/main.44582e8c.css" +[GIN] 2023/05/20 - 10:50:12 | 200 | 37.66425ms | ::1 | GET "/static/js/main.35f71d41.js" +[GIN] 2023/05/20 - 10:50:12 | 200 | 233.625µs | ::1 | GET "/logo.png" +[GIN] 2023/05/20 - 10:50:12 | 200 | 2.301584ms | ::1 | GET "/static/js/416.8b714abc.chunk.js" +[GIN] 2023/05/20 - 10:50:12 | 200 | 504.458µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 10:50:12 | 200 | 3.158792ms | ::1 | GET "/static/media/icons.38c6d8bab26db77d8c80.woff2" +[GIN] 2023/05/20 - 10:50:12 | 200 | 295.667µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 10:50:12 | 200 | 86.75µs | ::1 | GET "/api/home_page_content" +[SYS] 2023/05/20 - 10:53:52 | One API v0.0.0 started +[SYS] 2023/05/20 - 10:53:52 | SQL_DSN not set, using SQLite as database +[SYS] 2023/05/20 - 10:53:52 | REDIS_CONN_STRING not set, Redis is not enabled +[GIN] 2023/05/20 - 10:53:55 | 200 | 4.574625ms | ::1 | GET "/about" +[GIN] 2023/05/20 - 10:53:55 | 200 | 19.270708ms | ::1 | GET "/static/js/main.563ef435.js" +[GIN] 2023/05/20 - 10:53:55 | 200 | 152.334µs | ::1 | GET "/static/js/651.506a78d5.chunk.js" +[GIN] 2023/05/20 - 10:53:55 | 200 | 1.168292ms | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 10:53:55 | 200 | 347.042µs | ::1 | GET "/api/about" +[SYS] 2023/05/20 - 10:57:07 | One API v0.0.0 started +[SYS] 2023/05/20 - 10:57:07 | SQL_DSN not set, using SQLite as database +[SYS] 2023/05/20 - 10:57:07 | REDIS_CONN_STRING not set, Redis is not enabled +[GIN] 2023/05/20 - 10:57:10 | 200 | 5.57525ms | ::1 | GET "/login" +[GIN] 2023/05/20 - 10:57:10 | 200 | 437.416µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 10:57:16 | 200 | 92.48725ms | ::1 | POST "/api/user/login" +[GIN] 2023/05/20 - 10:57:16 | 200 | 346.416µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 10:57:16 | 200 | 1.17375ms | ::1 | GET "/api/home_page_content" +[SYS] 2023/05/20 - 11:02:29 | One API v0.0.0 started +[SYS] 2023/05/20 - 11:02:29 | SQL_DSN not set, using SQLite as database +[SYS] 2023/05/20 - 11:02:29 | REDIS_CONN_STRING not set, Redis is not enabled +[SYS] 2023/05/20 - 11:03:31 | One API v0.0.0 started +[SYS] 2023/05/20 - 11:03:31 | SQL_DSN not set, using SQLite as database +[SYS] 2023/05/20 - 11:03:31 | REDIS_CONN_STRING not set, Redis is not enabled +[GIN] 2023/05/20 - 11:04:23 | 200 | 10.946667ms | ::1 | GET "/" +[GIN] 2023/05/20 - 11:04:23 | 200 | 17.728625ms | ::1 | GET "/static/js/main.cabf255c.js" +[GIN] 2023/05/20 - 11:04:23 | 200 | 587.542µs | ::1 | GET "/static/js/416.1d27c003.chunk.js" +[GIN] 2023/05/20 - 11:04:23 | 200 | 817.292µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:04:23 | 200 | 844.167µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:04:23 | 200 | 1.285375ms | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:04:30 | 401 | 1.201041ms | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:04:30 | 200 | 317.333µs | ::1 | GET "/login?expired=true" +[GIN] 2023/05/20 - 11:04:30 | 200 | 394.875µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:04:35 | 200 | 110.355417ms | ::1 | POST "/api/user/login" +[GIN] 2023/05/20 - 11:04:35 | 200 | 308.167µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:04:35 | 200 | 1.375292ms | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:04:37 | 200 | 2.070208ms | ::1 | GET "/api/channel/?p=0" +[SYS] 2023/05/20 - 11:13:57 | One API v0.0.0 started +[SYS] 2023/05/20 - 11:13:57 | SQL_DSN not set, using SQLite as database +[SYS] 2023/05/20 - 11:13:57 | REDIS_CONN_STRING not set, Redis is not enabled +[GIN] 2023/05/20 - 11:13:59 | 200 | 3.902791ms | ::1 | GET "/redemption" +[GIN] 2023/05/20 - 11:13:59 | 200 | 20.436084ms | ::1 | GET "/static/js/main.f1005143.js" +[GIN] 2023/05/20 - 11:13:59 | 401 | 1.785625ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:13:59 | 200 | 1.757167ms | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:14:00 | 200 | 339.667µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:14:03 | 200 | 102.874875ms | ::1 | POST "/api/user/login" +[GIN] 2023/05/20 - 11:14:03 | 200 | 68.916µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:14:03 | 200 | 259µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:14:05 | 200 | 801.083µs | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:14:06 | 200 | 1.199667ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:14:07 | 200 | 579.958µs | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:14:08 | 200 | 350.75µs | ::1 | GET "/channel" +[GIN] 2023/05/20 - 11:14:08 | 200 | 210.958µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:14:08 | 200 | 358.209µs | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:14:09 | 200 | 835.541µs | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:14:13 | 200 | 1.744458ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:14:14 | 200 | 596.75µs | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:14:15 | 200 | 1.115042ms | ::1 | GET "/api/user/self" +[GIN] 2023/05/20 - 11:15:25 | 200 | 8.254125ms | ::1 | GET "/api/redemption/?p=0" +[SYS] 2023/05/20 - 11:22:16 | One API v0.0.0 started +[SYS] 2023/05/20 - 11:22:16 | SQL_DSN not set, using SQLite as database +[SYS] 2023/05/20 - 11:22:16 | REDIS_CONN_STRING not set, Redis is not enabled +[GIN] 2023/05/20 - 11:22:28 | 200 | 2.60625ms | ::1 | GET "/redemption" +[GIN] 2023/05/20 - 11:22:28 | 200 | 29.388167ms | ::1 | GET "/static/js/main.db5a4b5f.js" +[GIN] 2023/05/20 - 11:22:28 | 401 | 292.208µs | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:22:28 | 200 | 1.564792ms | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:22:28 | 200 | 331.083µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:22:32 | 200 | 102.481375ms | ::1 | POST "/api/user/login" +[GIN] 2023/05/20 - 11:22:32 | 200 | 59.25µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:22:32 | 200 | 343.042µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:22:36 | 200 | 1.732458ms | ::1 | GET "/api/option/" +[GIN] 2023/05/20 - 11:22:37 | 200 | 2.01025ms | ::1 | GET "/api/option/" +[GIN] 2023/05/20 - 11:22:50 | 200 | 4.890791ms | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:22:51 | 200 | 1.106041ms | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:22:52 | 200 | 2.122375ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:22:52 | 200 | 528µs | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:22:53 | 200 | 1.728416ms | ::1 | GET "/token" +[GIN] 2023/05/20 - 11:22:54 | 200 | 155.584µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:22:54 | 200 | 367.541µs | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:22:55 | 200 | 1.617834ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:22:59 | 200 | 550.5µs | ::1 | GET "/redemption" +[GIN] 2023/05/20 - 11:22:59 | 200 | 687.542µs | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:22:59 | 200 | 208.959µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:23:05 | 200 | 7.089083ms | ::1 | GET "/redemption" +[GIN] 2023/05/20 - 11:23:05 | 200 | 230.041µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:23:05 | 200 | 5.105042ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:23:06 | 200 | 353.125µs | ::1 | GET "/redemption" +[GIN] 2023/05/20 - 11:23:06 | 200 | 498µs | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:23:06 | 200 | 509.75µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:23:07 | 200 | 369.208µs | ::1 | GET "/redemption" +[GIN] 2023/05/20 - 11:23:07 | 200 | 699.208µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:23:07 | 200 | 1.711833ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:23:12 | 200 | 23.809125ms | ::1 | POST "/api/redemption/" +[GIN] 2023/05/20 - 11:23:18 | 200 | 14.702917ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:23:21 | 200 | 5.68275ms | ::1 | GET "/api/user/self" +[GIN] 2023/05/20 - 11:23:27 | 200 | 505.375µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:23:27 | 200 | 502.25µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:23:29 | 200 | 1.938708ms | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:30:43 | 200 | 201.933667ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:30:44 | 200 | 6.772667ms | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:30:44 | 200 | 89.042µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:30:44 | 200 | 157.833µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:30:47 | 200 | 3.390667ms | ::1 | GET "/api/option/" +[GIN] 2023/05/20 - 11:30:55 | 200 | 581.708µs | ::1 | GET "/api/option/" +[GIN] 2023/05/20 - 11:30:59 | 200 | 1.142333ms | ::1 | GET "/setting" +[GIN] 2023/05/20 - 11:30:59 | 200 | 317.667µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:31:04 | 200 | 1.150167ms | ::1 | GET "/api/option/" +[GIN] 2023/05/20 - 11:31:07 | 200 | 86.75µs | ::1 | GET "/api/about" +[GIN] 2023/05/20 - 11:31:09 | 200 | 283.708µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:31:09 | 200 | 408.292µs | ::1 | GET "/api/notice" +[SYS] 2023/05/20 - 11:31:32 | One API v0.0.0 started +[SYS] 2023/05/20 - 11:31:32 | SQL_DSN not set, using SQLite as database +[SYS] 2023/05/20 - 11:31:32 | REDIS_CONN_STRING not set, Redis is not enabled +[GIN] 2023/05/20 - 11:40:34 | 200 | 12.623208ms | ::1 | GET "/" +[GIN] 2023/05/20 - 11:40:34 | 200 | 26.049708ms | ::1 | GET "/static/js/main.eabb3f33.js" +[GIN] 2023/05/20 - 11:40:34 | 200 | 2.1255ms | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:40:34 | 200 | 88.875µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:40:34 | 200 | 247.5µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:40:36 | 401 | 3.135833ms | ::1 | GET "/api/user/?p=0" +[GIN] 2023/05/20 - 11:40:37 | 200 | 456.625µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:40:49 | 200 | 107.857125ms | ::1 | POST "/api/user/register?turnstile=" +[GIN] 2023/05/20 - 11:40:56 | 200 | 104.766542ms | ::1 | POST "/api/user/login" +[GIN] 2023/05/20 - 11:40:57 | 200 | 70.167µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:40:57 | 200 | 53.042µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:40:58 | 200 | 3.044375ms | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:41:00 | 200 | 64.208µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:41:00 | 200 | 383.917µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:41:00 | 200 | 908.375µs | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:41:01 | 200 | 1.000334ms | ::1 | GET "/token" +[GIN] 2023/05/20 - 11:41:01 | 200 | 301.833µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:41:01 | 200 | 531.334µs | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:41:02 | 200 | 1.114709ms | ::1 | GET "/api/user/self" +[GIN] 2023/05/20 - 11:41:03 | 200 | 2.626583ms | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:41:03 | 200 | 322.417µs | ::1 | GET "/token" +[GIN] 2023/05/20 - 11:41:03 | 200 | 229.292µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:41:03 | 200 | 556.541µs | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:41:04 | 200 | 430.208µs | ::1 | GET "/api/user/self" +[GIN] 2023/05/20 - 11:41:30 | 200 | 32.115333ms | ::1 | GET "/api/about" +[GIN] 2023/05/20 - 11:41:33 | 200 | 320.583µs | ::1 | GET "/api/about" +[GIN] 2023/05/20 - 11:41:38 | 200 | 24.351625ms | ::1 | GET "/api/user/self" +[GIN] 2023/05/20 - 11:41:39 | 200 | 674.667µs | ::1 | GET "/api/token/?p=0" +[SYS] 2023/05/20 - 11:42:42 | One API v0.0.0 started +[SYS] 2023/05/20 - 11:42:42 | SQL_DSN not set, using SQLite as database +[SYS] 2023/05/20 - 11:42:42 | REDIS_CONN_STRING not set, Redis is not enabled +[GIN] 2023/05/20 - 11:43:42 | 200 | 5.192417ms | ::1 | GET "/api/about" +[GIN] 2023/05/20 - 11:43:45 | 200 | 2.559209ms | ::1 | GET "/api/user/logout" +[GIN] 2023/05/20 - 11:43:48 | 200 | 114.867958ms | ::1 | POST "/api/user/login" +[GIN] 2023/05/20 - 11:43:48 | 200 | 659.209µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:43:48 | 200 | 720.042µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:43:50 | 200 | 4.758833ms | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:43:51 | 200 | 1.15525ms | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:43:52 | 200 | 598.667µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:43:52 | 200 | 94.833µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:43:54 | 200 | 566.042µs | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:43:56 | 200 | 6.009166ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:43:58 | 200 | 1.360416ms | ::1 | GET "/api/user/self" +[GIN] 2023/05/20 - 11:43:58 | 200 | 981.875µs | ::1 | GET "/api/user/?p=0" +[GIN] 2023/05/20 - 11:44:02 | 200 | 9.3375ms | ::1 | POST "/api/user/manage" +[GIN] 2023/05/20 - 11:44:03 | 200 | 3.222792ms | ::1 | POST "/api/user/manage" +[GIN] 2023/05/20 - 11:44:05 | 200 | 1.084292ms | ::1 | GET "/api/user/?p=0" +[GIN] 2023/05/20 - 11:44:07 | 200 | 749.25µs | ::1 | GET "/api/option/" +[GIN] 2023/05/20 - 11:44:09 | 200 | 593.25µs | ::1 | GET "/api/option/" +[SYS] 2023/05/20 - 11:48:39 | One API v0.0.0 started +[SYS] 2023/05/20 - 11:48:39 | SQL_DSN not set, using SQLite as database +[SYS] 2023/05/20 - 11:48:39 | REDIS_CONN_STRING not set, Redis is not enabled +[GIN] 2023/05/20 - 11:48:48 | 200 | 1.689542ms | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:48:48 | 200 | 1.726833ms | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:48:53 | 401 | 238.167µs | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:48:53 | 200 | 493.708µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:48:59 | 200 | 79.901166ms | ::1 | POST "/api/user/login" +[GIN] 2023/05/20 - 11:48:59 | 200 | 84.875µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:48:59 | 200 | 462.5µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:49:00 | 200 | 4.78ms | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:49:30 | 200 | 5.747209ms | ::1 | GET "/channel" +[GIN] 2023/05/20 - 11:49:30 | 200 | 27.551167ms | ::1 | GET "/static/js/main.58eb6be2.js" +[GIN] 2023/05/20 - 11:49:30 | 200 | 1.23575ms | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:49:30 | 200 | 4.132417ms | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:49:31 | 200 | 211.833µs | ::1 | GET "/channel" +[GIN] 2023/05/20 - 11:49:31 | 200 | 3.979709ms | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:49:31 | 200 | 1.640167ms | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:49:32 | 200 | 254.042µs | ::1 | GET "/channel" +[GIN] 2023/05/20 - 11:49:32 | 200 | 25.220916ms | ::1 | GET "/static/css/main.44582e8c.css" +[GIN] 2023/05/20 - 11:49:32 | 200 | 27.9145ms | ::1 | GET "/static/js/main.58eb6be2.js" +[GIN] 2023/05/20 - 11:49:32 | 200 | 693.583µs | ::1 | GET "/logo.png" +[GIN] 2023/05/20 - 11:49:32 | 200 | 224.959µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:49:32 | 200 | 1.3275ms | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:49:32 | 200 | 4.942209ms | ::1 | GET "/static/media/icons.38c6d8bab26db77d8c80.woff2" +[GIN] 2023/05/20 - 11:49:32 | 200 | 185.25µs | ::1 | GET "/logo.png" +[GIN] 2023/05/20 - 11:49:34 | 200 | 1.939833ms | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:49:35 | 200 | 2.873667ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:49:35 | 200 | 4.074708ms | ::1 | GET "/api/user/self" +[GIN] 2023/05/20 - 11:49:39 | 200 | 1.153291ms | ::1 | GET "/api/user/?p=0" +[GIN] 2023/05/20 - 11:49:42 | 200 | 835.75µs | ::1 | GET "/api/option/" +[GIN] 2023/05/20 - 11:49:57 | 200 | 1.550666ms | ::1 | GET "/api/user/self" +[GIN] 2023/05/20 - 11:49:57 | 200 | 2.227125ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:54:08 | 200 | 4.533875ms | ::1 | GET "/redemption" +[GIN] 2023/05/20 - 11:54:08 | 200 | 1.592542ms | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:54:08 | 200 | 40.118583ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:54:09 | 200 | 86.708µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:54:09 | 200 | 66.666µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:54:09 | 200 | 1.1075ms | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:54:10 | 200 | 772.167µs | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:54:10 | 200 | 748µs | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:54:10 | 200 | 1.773459ms | ::1 | GET "/api/user/self" +[GIN] 2023/05/20 - 11:54:11 | 200 | 956.625µs | ::1 | GET "/api/user/?p=0" +[GIN] 2023/05/20 - 11:54:13 | 200 | 313.167µs | ::1 | GET "/api/about" +[GIN] 2023/05/20 - 11:54:39 | 200 | 2.360292ms | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:54:41 | 200 | 476.542µs | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:54:43 | 200 | 1.035833ms | ::1 | GET "/api/redemption/?p=0" +[GIN] 2023/05/20 - 11:54:44 | 200 | 1.151625ms | ::1 | GET "/api/user/self" +[GIN] 2023/05/20 - 11:54:46 | 200 | 1.51825ms | ::1 | GET "/api/user/?p=0" +[GIN] 2023/05/20 - 11:54:50 | 200 | 1.077125ms | ::1 | GET "/api/option/" +[GIN] 2023/05/20 - 11:54:51 | 200 | 387.875µs | ::1 | GET "/api/option/" +[GIN] 2023/05/20 - 11:55:01 | 200 | 16.721208ms | ::1 | PUT "/api/option/" +[GIN] 2023/05/20 - 11:55:03 | 200 | 1.328625ms | ::1 | PUT "/api/option/" +[GIN] 2023/05/20 - 11:55:06 | 200 | 3.265042ms | ::1 | PUT "/api/option/" +[GIN] 2023/05/20 - 11:55:10 | 200 | 2.295333ms | ::1 | PUT "/api/option/" +[GIN] 2023/05/20 - 11:55:15 | 200 | 811.917µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:55:15 | 200 | 740.583µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:55:18 | 200 | 2.017ms | ::1 | GET "/" +[GIN] 2023/05/20 - 11:55:18 | 200 | 394.542µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:55:18 | 200 | 119.958µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:55:18 | 200 | 215.583µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:55:19 | 200 | 1.454833ms | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:55:20 | 200 | 191.958µs | ::1 | GET "/api/notice" +[GIN] 2023/05/20 - 11:55:20 | 200 | 133.167µs | ::1 | GET "/api/home_page_content" +[GIN] 2023/05/20 - 11:55:22 | 200 | 226.083µs | ::1 | GET "/api/about" +[GIN] 2023/05/20 - 11:55:23 | 200 | 1.497625ms | ::1 | GET "/api/option/" +[GIN] 2023/05/20 - 11:55:32 | 200 | 2.831792ms | ::1 | GET "/api/token/?p=0" +[GIN] 2023/05/20 - 11:55:32 | 200 | 713.542µs | ::1 | GET "/api/channel/?p=0" +[GIN] 2023/05/20 - 11:55:34 | 200 | 88.375µs | ::1 | GET "/api/about" +[GIN] 2023/05/20 - 11:55:47 | 200 | 814.583µs | ::1 | GET "/api/option/" +[GIN] 2023/05/20 - 11:55:49 | 200 | 7.444959ms | ::1 | GET "/setting" +[GIN] 2023/05/20 - 11:55:49 | 200 | 254.417µs | ::1 | GET "/api/status" +[GIN] 2023/05/20 - 11:55:50 | 200 | 448.625µs | ::1 | GET "/api/option/" +[GIN] 2023/05/20 - 11:55:58 | 200 | 270.292µs | ::1 | GET "/api/about" diff --git a/logs/error.log b/logs/error.log new file mode 100644 index 00000000..e69de29b diff --git a/one-api b/one-api new file mode 100755 index 00000000..3d3e2b9d Binary files /dev/null and b/one-api differ diff --git a/rebuild.sh b/rebuild.sh new file mode 100755 index 00000000..e45a3c59 --- /dev/null +++ b/rebuild.sh @@ -0,0 +1,5 @@ +cd web +npm run build +cd .. +go build -ldflags "-s -w" -o one-api +./one-api --port 3001 --log-dir ./logs \ No newline at end of file diff --git a/web/src/components/LoginForm.js b/web/src/components/LoginForm.js index e4802db0..f59fb928 100644 --- a/web/src/components/LoginForm.js +++ b/web/src/components/LoginForm.js @@ -96,7 +96,7 @@ const LoginForm = () => {
- 用户登录 + Login
@@ -125,11 +125,11 @@ const LoginForm = () => {
- Forgot Password + Forgot Password Reset Password - ; No account ? + ; No account? Click to Register diff --git a/web/src/components/OtherSetting.js b/web/src/components/OtherSetting.js index 3a2ed82f..7ab0d572 100644 --- a/web/src/components/OtherSetting.js +++ b/web/src/components/OtherSetting.js @@ -89,7 +89,7 @@ const OtherSetting = () => { const checkUpdate = async () => { const res = await API.get( - 'https://api.github.com/repos/analogpvt/one-api/releases/latest' + 'https://api.github.com/repos/analogpvt/one-api-en/releases/latest' ); const { tag_name, body } = res.data; if (tag_name === process.env.REACT_APP_VERSION) { @@ -108,7 +108,7 @@ const OtherSetting = () => {
General Settings
- 检查更新 + Check for updates { onChange={handleInputChange} /> - 设置系统名称 + Set System Name { style={{ minHeight: 150, fontFamily: 'JetBrains Mono, Consolas' }} /> - 保存关于 + Save About { - + + diff --git a/web/src/pages/Channel/index.js b/web/src/pages/Channel/index.js index 57b64893..a6a0f78b 100644 --- a/web/src/pages/Channel/index.js +++ b/web/src/pages/Channel/index.js @@ -5,7 +5,7 @@ import ChannelsTable from '../../components/ChannelsTable'; const File = () => ( <> -
管理渠道
+
Channel Management
diff --git a/web/src/pages/Home/index.js b/web/src/pages/Home/index.js index 20d42104..60833c2a 100644 --- a/web/src/pages/Home/index.js +++ b/web/src/pages/Home/index.js @@ -36,7 +36,7 @@ const Home = () => { localStorage.setItem('home_page_content', content); } else { showError(message); - setHomePageContent('加载首页内容失败...'); + setHomePageContent('Failed to load home page content...'); } setHomePageContentLoaded(true); }; @@ -55,18 +55,18 @@ const Home = () => { { homePageContentLoaded && homePageContent === '' ? <> -
系统状况
+
System Status
- 系统信息 - 系统信息总览 + System Message + System Information Overview -

名称:{statusState?.status?.system_name}

-

版本:{statusState?.status?.version}

+

Name: {statusState?.status?.system_name}

+

Version: {statusState?.status?.version}

- 源码: + Source Code: { https://github.com/songquanpeng/one-api

-

启动时间:{getStartTimeString()}

+

Start Time: {getStartTimeString()}

@@ -82,32 +82,32 @@ const Home = () => { - 系统配置 - 系统配置总览 + System Configuration + System configuration overview

- 邮箱验证: + E-mail verification: {statusState?.status?.email_verification === true - ? '已启用' - : '未启用'} + ? 'Enabled' + : 'Not Enabled'}

- GitHub 身份验证: + GitHub authentication: {statusState?.status?.github_oauth === true - ? '已启用' - : '未启用'} + ? 'Enabled' + : 'Not Enabled'}

- 微信身份验证: + WeChat authentication: {statusState?.status?.wechat_login === true - ? '已启用' - : '未启用'} + ? 'Enabled' + : 'Not Enabled'}

- Turnstile 用户校验: + Turnstile user validation: {statusState?.status?.turnstile_check === true - ? '已启用' - : '未启用'} + ? 'Enabled' + : 'Not Enabled'}

diff --git a/web/src/pages/Redemption/EditRedemption.js b/web/src/pages/Redemption/EditRedemption.js index 687864ba..ed0c75cd 100644 --- a/web/src/pages/Redemption/EditRedemption.js +++ b/web/src/pages/Redemption/EditRedemption.js @@ -52,9 +52,9 @@ const EditRedemption = () => { const { success, message, data } = res.data; if (success) { if (isEdit) { - showSuccess('兑换码更新成功!'); + showSuccess('Redemption code updated successfully!'); } else { - showSuccess('兑换码创建成功!'); + showSuccess('Redemption code created successfully!'); setInputs(originInputs); } } else { @@ -72,13 +72,13 @@ const EditRedemption = () => { return ( <> -
{isEdit ? '更新兑换码信息' : '创建新的兑换码'}
+
{isEdit ? 'Edit redemption code' : 'Create a redemption code'}
{ { !isEdit && <> { } - +
diff --git a/web/src/pages/Redemption/index.js b/web/src/pages/Redemption/index.js index c0649412..ad312ac5 100644 --- a/web/src/pages/Redemption/index.js +++ b/web/src/pages/Redemption/index.js @@ -5,7 +5,7 @@ import RedemptionsTable from '../../components/RedemptionsTable'; const Redemption = () => ( <> -
管理兑换码
+
Manage redemption code
diff --git a/web/src/pages/Setting/index.js b/web/src/pages/Setting/index.js index 392e2ca7..f027b3e0 100644 --- a/web/src/pages/Setting/index.js +++ b/web/src/pages/Setting/index.js @@ -8,7 +8,7 @@ import PersonalSetting from '../../components/PersonalSetting'; const Setting = () => { let panes = [ { - menuItem: '个人设置', + menuItem: 'Personal Settings', render: () => ( @@ -19,7 +19,7 @@ const Setting = () => { if (isRoot()) { panes.push({ - menuItem: '系统设置', + menuItem: 'System Settings', render: () => ( @@ -27,7 +27,7 @@ const Setting = () => { ) }); panes.push({ - menuItem: '其他设置', + menuItem: 'Other Settings', render: () => ( diff --git a/web/src/pages/Token/EditToken.js b/web/src/pages/Token/EditToken.js index dd8022e1..df534700 100644 --- a/web/src/pages/Token/EditToken.js +++ b/web/src/pages/Token/EditToken.js @@ -66,7 +66,7 @@ const EditToken = () => { if (localInputs.expired_time !== -1) { let time = Date.parse(localInputs.expired_time); if (isNaN(time)) { - showError('过期时间格式错误!'); + showError('Expiration time format error!'); return; } localInputs.expired_time = Math.ceil(time / 1000); @@ -80,9 +80,9 @@ const EditToken = () => { const { success, message } = res.data; if (success) { if (isEdit) { - showSuccess('令牌更新成功!'); + showSuccess('Token updated successfully!'); } else { - showSuccess('令牌创建成功!'); + showSuccess('Token created successfully!'); setInputs(originInputs); } } else { @@ -93,25 +93,25 @@ const EditToken = () => { return ( <> -
{isEdit ? '更新令牌信息' : '创建新的令牌'}
+
{isEdit ? 'Edit token' : 'Create a new token'}
- 注意,令牌的额度仅用于限制令牌本身的最大额度使用量,实际的使用受到账户的剩余额度限制。 + Note that the amount of the token is only used to limit the maximum usage of the token itself, and the actual usage is limited by the remaining amount of the account. { + }}>{unlimited_quota ? 'Unlimited' : 'Set to unlimited'} { + }}>Never expires + }}>Expires in one month + }}>Expires in one day + }}>Expires in one hour - + }}>Expires in one minute +
+
diff --git a/web/src/pages/Token/index.js b/web/src/pages/Token/index.js index c995131e..071ea344 100644 --- a/web/src/pages/Token/index.js +++ b/web/src/pages/Token/index.js @@ -5,7 +5,7 @@ import TokensTable from '../../components/TokensTable'; const Token = () => ( <> -
我的令牌
+
My token
diff --git a/web/src/pages/TopUp/index.js b/web/src/pages/TopUp/index.js index d32d1115..31d9d6e4 100644 --- a/web/src/pages/TopUp/index.js +++ b/web/src/pages/TopUp/index.js @@ -28,7 +28,7 @@ const TopUp = () => { const openTopUpLink = () => { if (!topUpLink) { - showError('超级管理员未设置充值链接!'); + showError('The super administrator has not set a recharge link!'); return; } window.open(topUpLink, '_blank'); @@ -57,12 +57,12 @@ const TopUp = () => { return ( -
充值额度
+
Recharge amount
{ @@ -70,10 +70,10 @@ const TopUp = () => { }} />
@@ -81,7 +81,7 @@ const TopUp = () => { {userQuota} - 剩余额度 + Balance
diff --git a/web/src/pages/User/AddUser.js b/web/src/pages/User/AddUser.js index 73036ada..d892663b 100644 --- a/web/src/pages/User/AddUser.js +++ b/web/src/pages/User/AddUser.js @@ -20,7 +20,7 @@ const AddUser = () => { const res = await API.post(`/api/user/`, inputs); const { success, message } = res.data; if (success) { - showSuccess('用户账户创建成功!'); + showSuccess('User account created successfully!'); setInputs(originInputs); } else { showError(message); @@ -30,13 +30,13 @@ const AddUser = () => { return ( <> -
创建新用户账户
+
Create new user account
{ { { />
diff --git a/web/src/pages/User/EditUser.js b/web/src/pages/User/EditUser.js index a8d4e7cf..2e5f936e 100644 --- a/web/src/pages/User/EditUser.js +++ b/web/src/pages/User/EditUser.js @@ -50,7 +50,7 @@ const EditUser = () => { } const { success, message } = res.data; if (success) { - showSuccess('用户信息更新成功!'); + showSuccess('User information updated successfully!'); } else { showError(message); } @@ -59,13 +59,13 @@ const EditUser = () => { return ( <> -
更新用户信息
+
Update User Information
{ { { - +
diff --git a/web/src/pages/User/index.js b/web/src/pages/User/index.js index 29f7437a..dfdf7a85 100644 --- a/web/src/pages/User/index.js +++ b/web/src/pages/User/index.js @@ -5,7 +5,7 @@ import UsersTable from '../../components/UsersTable'; const User = () => ( <> -
管理用户
+
Manage Users