reorganize

This commit is contained in:
Cyberes 2023-12-12 17:30:47 -07:00
parent 6377b8b6bc
commit a39b3ea010
5 changed files with 19 additions and 6 deletions

View File

@ -4,6 +4,7 @@ import (
"crazyfs/api/routes"
"crazyfs/api/routes/admin"
"crazyfs/api/routes/client"
"crazyfs/api/routes/file"
"crazyfs/config"
"crazyfs/logging"
"encoding/json"
@ -28,19 +29,19 @@ var httpRoutes = Routes{
"ListDir",
"GET",
"/api/file/list",
routes.ListDir,
file.ListDir,
},
Route{
"Download",
"GET",
"/api/file/download",
routes.Download,
file.Download,
},
Route{
"Thumbnail",
"GET",
"/api/file/thumb",
routes.Thumbnail,
file.Thumbnail,
},
Route{
"Search",

View File

@ -1,4 +1,4 @@
package routes
package file
import (
"crazyfs/SharedCache"

View File

@ -1,4 +1,4 @@
package routes
package file
import (
"crazyfs/CacheItem"

View File

@ -1,4 +1,4 @@
package routes
package file
import (
"bytes"

View File

@ -0,0 +1,12 @@
package file
import (
"crazyfs/logging"
"github.com/sirupsen/logrus"
)
var log *logrus.Logger
func init() {
log = logging.GetLogger()
}