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"
"crazyfs/api/routes/admin" "crazyfs/api/routes/admin"
"crazyfs/api/routes/client" "crazyfs/api/routes/client"
"crazyfs/api/routes/file"
"crazyfs/config" "crazyfs/config"
"crazyfs/logging" "crazyfs/logging"
"encoding/json" "encoding/json"
@ -28,19 +29,19 @@ var httpRoutes = Routes{
"ListDir", "ListDir",
"GET", "GET",
"/api/file/list", "/api/file/list",
routes.ListDir, file.ListDir,
}, },
Route{ Route{
"Download", "Download",
"GET", "GET",
"/api/file/download", "/api/file/download",
routes.Download, file.Download,
}, },
Route{ Route{
"Thumbnail", "Thumbnail",
"GET", "GET",
"/api/file/thumb", "/api/file/thumb",
routes.Thumbnail, file.Thumbnail,
}, },
Route{ Route{
"Search", "Search",

View File

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

View File

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

View File

@ -1,4 +1,4 @@
package routes package file
import ( import (
"bytes" "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()
}