This commit is contained in:
Henrique Dias committed 2015-09-27 19:49:58 +01:00
1 parent 8f94827723
commit b1f13f1a4a
4 files changed
+24 -14

No files matched your search

-10
View File
@@ -7,16 +7,6 @@ import (
"github.com/hacdias/staticmin/config"
)
type editor struct {
Name string
Class string
IsPost bool
Mode string
Content string
FrontMatter interface{}
Config *config.Config
}
// ServeHTTP serves the editor page
func ServeHTTP(w http.ResponseWriter, r *http.Request, c *config.Config) (int, error) {
filename := strings.Replace(r.URL.Path, "/admin/edit/", "", 1)
+10
View File
@@ -16,6 +16,16 @@ import (
"github.com/spf13/hugo/parser"
)
type editor struct {
Name string
Class string
IsPost bool
Mode string
Content string
FrontMatter interface{}
Config *config.Config
}
// GET handles the GET method on editor page
func GET(w http.ResponseWriter, r *http.Request, c *config.Config, filename string) (int, error) {
// Check if the file format is supported. If not, send a "Not Acceptable"