Refine the directory structure of this project.

This commit is contained in:
zicla
2019-04-24 19:36:10 +08:00
parent a353ff1303
commit daa5847859
22 changed files with 517 additions and 415 deletions

View File

@ -3,6 +3,7 @@ package rest
import (
"net/http"
"strconv"
"tank/rest/result"
)
type FootprintController struct {
@ -42,7 +43,7 @@ func (this *FootprintController) RegisterRoutes() map[string]func(writer http.Re
}
//查看详情。
func (this *FootprintController) Detail(writer http.ResponseWriter, request *http.Request) *WebResult {
func (this *FootprintController) Detail(writer http.ResponseWriter, request *http.Request) *result.WebResult {
uuid := request.FormValue("uuid")
if uuid == "" {
@ -64,7 +65,7 @@ func (this *FootprintController) Detail(writer http.ResponseWriter, request *htt
}
//按照分页的方式查询
func (this *FootprintController) Page(writer http.ResponseWriter, request *http.Request) *WebResult {
func (this *FootprintController) Page(writer http.ResponseWriter, request *http.Request) *result.WebResult {
//如果是根目录那么就传入root.
pageStr := request.FormValue("page")
@ -108,7 +109,7 @@ func (this *FootprintController) Page(writer http.ResponseWriter, request *http.
}
//删除一条记录
func (this *FootprintController) Delete(writer http.ResponseWriter, request *http.Request) *WebResult {
func (this *FootprintController) Delete(writer http.ResponseWriter, request *http.Request) *result.WebResult {
uuid := request.FormValue("uuid")
if uuid == "" {