From 29c395635bbc5824f7864f774850d065b506c47d Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Tue, 4 Oct 2016 16:31:22 -0700 Subject: implementing support for file uploads, fixing some content issues with non-standard characters, removing base64 encoding of content --- system/api/server.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'system/api/server.go') diff --git a/system/api/server.go b/system/api/server.go index 5fa0bfc..5de10a2 100644 --- a/system/api/server.go +++ b/system/api/server.go @@ -10,7 +10,8 @@ import ( "github.com/nilslice/cms/system/db" ) -func init() { +// Run adds Handlers to default http listener for API +func Run() { http.HandleFunc("/api/types", func(res http.ResponseWriter, req *http.Request) { var types = []string{} for t := range content.Types { @@ -128,8 +129,3 @@ func wrapJSON(json []byte) []byte { return buf.Bytes() } - -// Run start the JSON API -func Run(port string) { - log.Fatal(http.ListenAndServe(":"+port, nil)) -} -- cgit v1.2.3