move assets handler to assets package.

This commit is contained in:
tengge 2020-05-04 08:33:12 +08:00
parent 87025dca41
commit f5ae325ecd
47 changed files with 32 additions and 19 deletions

View File

@ -16,23 +16,12 @@ import (
"github.com/tengge1/shadoweditor/server"
// TODO: Is it better to move the imports to `../main.go`?
_ "github.com/tengge1/shadoweditor/server/animation" // animation api
_ "github.com/tengge1/shadoweditor/server/assets" // assets api
_ "github.com/tengge1/shadoweditor/server/audio" // audio api
_ "github.com/tengge1/shadoweditor/server/category" // category api
_ "github.com/tengge1/shadoweditor/server/character" // character api
_ "github.com/tengge1/shadoweditor/server/export" // export api
_ "github.com/tengge1/shadoweditor/server/material" // material api
_ "github.com/tengge1/shadoweditor/server/mesh" // mesh api
_ "github.com/tengge1/shadoweditor/server/particle" // particle api
_ "github.com/tengge1/shadoweditor/server/prefab" // prefab api
_ "github.com/tengge1/shadoweditor/server/scene" // scene api
_ "github.com/tengge1/shadoweditor/server/screenshot" // screenshot api
_ "github.com/tengge1/shadoweditor/server/system" // system api
_ "github.com/tengge1/shadoweditor/server/texture" // texture api
_ "github.com/tengge1/shadoweditor/server/tools" // tools api
_ "github.com/tengge1/shadoweditor/server/upload" // upload api
_ "github.com/tengge1/shadoweditor/server/video" // video api
_ "github.com/tengge1/shadoweditor/server/assets" // assets api
_ "github.com/tengge1/shadoweditor/server/category" // category api
_ "github.com/tengge1/shadoweditor/server/export" // export api
_ "github.com/tengge1/shadoweditor/server/system" // system api
_ "github.com/tengge1/shadoweditor/server/tools" // tools api
_ "github.com/tengge1/shadoweditor/server/upload" // upload api
)
// serveCmd run the shadow editor server.

View File

@ -0,0 +1,24 @@
// Copyright 2017-2020 The ShadowEditor Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
//
// For more information, please visit: https://github.com/tengge1/ShadowEditor
// You can also visit: https://gitee.com/tengge1/ShadowEditor
package system
// Register handlers in `github.com/tengge1/shadoweditor/server/assets` here.
import (
_ "github.com/tengge1/shadoweditor/server/assets/animation" // animation api
_ "github.com/tengge1/shadoweditor/server/assets/audio" // audio api
_ "github.com/tengge1/shadoweditor/server/assets/character" // character api
_ "github.com/tengge1/shadoweditor/server/assets/material" // material api
_ "github.com/tengge1/shadoweditor/server/assets/mesh" // mesh api
_ "github.com/tengge1/shadoweditor/server/assets/particle" // particle api
_ "github.com/tengge1/shadoweditor/server/assets/prefab" // prefab api
_ "github.com/tengge1/shadoweditor/server/assets/scene" // scene api
_ "github.com/tengge1/shadoweditor/server/assets/screenshot" // screenshot api
_ "github.com/tengge1/shadoweditor/server/assets/summary" // summary api
_ "github.com/tengge1/shadoweditor/server/assets/texture" // texture api
_ "github.com/tengge1/shadoweditor/server/assets/video" // video api
)

View File

@ -5,7 +5,7 @@
// For more information, please visit: https://github.com/tengge1/ShadowEditor
// You can also visit: https://gitee.com/tengge1/ShadowEditor
package assets
package summary
import (
"net/http"

View File

@ -5,7 +5,7 @@
// For more information, please visit: https://github.com/tengge1/ShadowEditor
// You can also visit: https://gitee.com/tengge1/ShadowEditor
package assets
package summary
import (
"io/ioutil"