solve some back end bugs

Former-commit-id: de26609879e875b21de329588ecd1dcb44d152f3 [formerly 78b120bf0d33345808a422980db55d33c52304b7] [formerly d77c47bb41c1a7bf6ee2b2522bf7c86638d087bc [formerly 2819ab24b8]]
Former-commit-id: 3ddee564ddd5ed4fde01ed95f30386115a07df78 [formerly a3a1da0357874b7d99a88bd785c8f60f8170f663]
Former-commit-id: 0e15a59e28993f8178fa9409a466ce93a9936906
This commit is contained in:
Henrique Dias
2017-06-29 10:17:35 +01:00
parent a7b50c2de1
commit bff33c2c1e
10 changed files with 207 additions and 282 deletions

10
page.go
View File

@@ -26,13 +26,11 @@ type page struct {
User *User `json:"-"`
BaseURL string `json:"-"`
WebDavURL string `json:"-"`
Name string `json:"name"`
Path string `json:"path"`
Kind string `json:"kind"` // listing, editor or preview
Data interface{} `json:"data"`
Kind string `json:"kind"`
Data *file `json:"data"`
}
/*
// breadcrumbItem contains the Name and the URL of a breadcrumb piece.
type breadcrumbItem struct {
Name string
@@ -90,7 +88,7 @@ func (p page) PreviousLink() string {
}
return path
}
} */
func (p page) Render(c *requestContext, w http.ResponseWriter, r *http.Request) (int, error) {
if strings.Contains(r.Header.Get("Accept"), "application/json") {