@@ -30,34 +30,34 @@ func main() {
30
30
if err := s .Install (); err != nil {
31
31
log .Printf ("⚠️ SteamCMD installation warning: %v" , err )
32
32
}
33
+ }
33
34
34
- router := gin .Default ()
35
+ router := gin .Default ()
35
36
36
- h := handler .New (s )
37
- defer h .Cleanup ()
37
+ h := handler .New (s )
38
+ defer h .Cleanup ()
38
39
39
- router .GET ("/" , func (c * gin.Context ) {
40
- c .Redirect (http .StatusMovedPermanently , "/workshop/" )
41
- })
40
+ router .GET ("/" , func (c * gin.Context ) {
41
+ c .Redirect (http .StatusMovedPermanently , "/workshop/" )
42
+ })
42
43
43
- router .GET ("/api/workshop/:app_id/:workshop_id" , h .DownloadWorkshopHandler )
44
- router .GET ("/api/collection/:app_id/:collection_id" , h .DownloadCollectionHandler )
44
+ router .GET ("/api/workshop/:app_id/:workshop_id" , h .DownloadWorkshopHandler )
45
+ router .GET ("/api/collection/:app_id/:collection_id" , h .DownloadCollectionHandler )
45
46
46
- router .Any ("/workshop/*path" , h .SteamProxyHandler )
47
- router .Any ("/app/*path" , h .SteamProxyHandler )
48
- router .Any ("/sharedfiles/*path" , h .SteamProxyHandler )
47
+ router .Any ("/workshop/*path" , h .SteamProxyHandler )
48
+ router .Any ("/app/*path" , h .SteamProxyHandler )
49
+ router .Any ("/sharedfiles/*path" , h .SteamProxyHandler )
49
50
50
- unsupportedRoutes := []string {
51
- "/login/home/" , "/market/" , "/discussions/" , "/my/" ,
52
- "/id/" , "/account/" , "/profiles/" ,
53
- }
54
- for _ , route := range unsupportedRoutes {
55
- router .GET (route , h .UnsupportedPageHandler )
56
- }
51
+ unsupportedRoutes := []string {
52
+ "/login/home/" , "/market/" , "/discussions/" , "/my/" ,
53
+ "/id/" , "/account/" , "/profiles/" ,
54
+ }
55
+ for _ , route := range unsupportedRoutes {
56
+ router .GET (route , h .UnsupportedPageHandler )
57
+ }
57
58
58
- log .Printf ("🚀 Server starting on http://0.0.0.0:%s" , * port )
59
- if err := router .Run (":" + * port ); err != nil {
60
- log .Fatalf ("❌ Failed to start server: %v" , err )
61
- }
59
+ log .Printf ("🚀 Server starting on http://0.0.0.0:%s" , * port )
60
+ if err := router .Run (":" + * port ); err != nil {
61
+ log .Fatalf ("❌ Failed to start server: %v" , err )
62
62
}
63
63
}
0 commit comments