@@ -117,30 +117,30 @@ func DeleteSocketByKey(ctx *gin.Context) {
117117// @Success 200 {string} string "ok"
118118// @Router /dish/sockets/public [get]
119119func GetSocketListPublic (ctx * gin.Context ) {
120- var exportedSockets = make ( map [ string ]Socket )
120+ var exportedSockets [ ]Socket
121121 var counter int = 0
122122
123123 rawSocketsMap , _ := CacheSockets .GetAll ()
124124
125125 for _ , rawSocket := range rawSocketsMap {
126126 socket , ok := rawSocket .(Socket )
127127 if ! ok {
128- /*fmt.Printf("cannot assert type: %s\n", reflect.TypeOf(rawSocketsMap ))
128+ /*fmt.Printf("cannot assert type: %s\n", reflect.TypeOf(rawSocket ))
129129 fmt.Printf("rawSocket: %v\n", rawSocket)
130130 fmt.Printf("Socket: %v\n", Socket{})*/
131131 continue
132132 }
133133
134134 if socket .Public {
135- exportedSockets [ socket . ID ] = socket
135+ exportedSockets = append ( exportedSockets , socket )
136136 counter ++
137137 }
138138 }
139139
140140 ctx .IndentedJSON (http .StatusOK , gin.H {
141141 "code" : http .StatusOK ,
142142 "count" : counter ,
143- "items" : exportedSockets ,
143+ "sockets" : exportedSockets ,
144144 "message" : "ok, dumping public sockets" ,
145145 })
146146}
@@ -859,12 +859,12 @@ func GetDishRoot(ctx *gin.Context) {
859859// @Failure 404 {array} dish.Incident
860860// @Failure 500 {array} dish.Incident
861861// @Router /dish/restore [post]
862- func PostDumpRestore (ctx * gin.Context ) {
862+ func PostDumpRestore2 (ctx * gin.Context ) {
863863 core .BatchRestoreItems [Root ](ctx , restorePackage )
864864 return
865865}
866866
867- func PostDumpRestore2 (ctx * gin.Context ) {
867+ func PostDumpRestore (ctx * gin.Context ) {
868868 var counter []int = []int {0 , 0 }
869869
870870 var importDish = struct {
0 commit comments