@@ -29,6 +29,7 @@ import (
2929 "github.com/flatgrassdotnet/cloudbox/api/news"
3030 "github.com/flatgrassdotnet/cloudbox/api/packages"
3131 "github.com/flatgrassdotnet/cloudbox/db"
32+ "github.com/flatgrassdotnet/cloudbox/ingame/publishsave"
3233 "github.com/flatgrassdotnet/cloudbox/ingame/stats"
3334 "github.com/flatgrassdotnet/cloudbox/ingame/toyboxapi"
3435 "github.com/flatgrassdotnet/cloudbox/utils"
@@ -61,20 +62,38 @@ func main() {
6162 http .HandleFunc ("GET /packages/get" , packages .Get )
6263 http .HandleFunc ("GET /packages/getscript" , packages .GetScript )
6364 http .HandleFunc ("GET /packages/getgma" , packages .GetGMA )
64- http .HandleFunc ("GET /packages/publishsave" , packages .PublishSave )
6565 http .HandleFunc ("GET /content/get" , content .Get )
6666 http .HandleFunc ("GET /content/getzip" , content .GetZIP )
6767 http .HandleFunc ("GET /content/fastdl" , content .FastDL )
6868
6969 // stats.garrysmod.com
70- http .HandleFunc ("GET /API/mapload_001/" , stats .MapLoad )
70+ http .HandleFunc ("GET stats.garrysmod.com /API/mapload_001/" , stats .MapLoad )
7171
7272 // toyboxapi.garrysmod.com
73- http .HandleFunc ("POST /auth_003/" , toyboxapi .Auth )
74- http .HandleFunc ("GET /error_003/" , toyboxapi .Error )
75- http .HandleFunc ("GET /getinstall_003/" , toyboxapi .GetPackage )
76- http .HandleFunc ("GET /getscript_003/" , toyboxapi .GetPackage )
77- http .HandleFunc ("POST /upload_003/" , toyboxapi .Upload )
73+ // auth
74+ http .HandleFunc ("GET toyboxapi.garrysmod.com/auth_001/" , toyboxapi .Auth )
75+ http .HandleFunc ("POST toyboxapi.garrysmod.com/auth_002/" , toyboxapi .Auth )
76+ http .HandleFunc ("POST toyboxapi.garrysmod.com/auth_003/" , toyboxapi .Auth )
77+
78+ // getinstall
79+ http .HandleFunc ("GET toyboxapi.garrysmod.com/getinstall_001/" , toyboxapi .GetPackage )
80+ http .HandleFunc ("GET toyboxapi.garrysmod.com/getinstall_003/" , toyboxapi .GetPackage )
81+
82+ // getscript
83+ http .HandleFunc ("GET toyboxapi.garrysmod.com/getscript_001/" , toyboxapi .GetPackage )
84+ http .HandleFunc ("GET toyboxapi.garrysmod.com/getscript_003/" , toyboxapi .GetPackage )
85+
86+ // upload
87+ http .HandleFunc ("POST toyboxapi.garrysmod.com/upload_001/" , toyboxapi .Upload )
88+ http .HandleFunc ("POST toyboxapi.garrysmod.com/upload_003/" , toyboxapi .Upload )
89+
90+ // error
91+ http .HandleFunc ("GET toyboxapi.garrysmod.com/error_001/" , toyboxapi .Error )
92+ http .HandleFunc ("GET toyboxapi.garrysmod.com/error_003/" , toyboxapi .Error )
93+
94+ // publishsave
95+ http .HandleFunc ("GET toyboxapi.garrysmod.com/publishsave_002/" , publishsave .Save ) // virtual
96+ http .HandleFunc ("POST toyboxapi.garrysmod.com/publishsave_002/" , publishsave .Publish ) // virtual
7897
7998 err = http .ListenAndServe (fmt .Sprintf (":%d" , * port ), nil )
8099 if err != nil {
0 commit comments