Refine the directory structure of this project.
This commit is contained in:
@ -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 == "" {
|
||||
|
Reference in New Issue
Block a user