0
0
Fork 0

add initial route support for admin panel

This commit is contained in:
Gibheer 2014-12-16 23:43:49 +01:00
parent e6a50c238c
commit 0980b8d0a6
2 changed files with 18 additions and 2 deletions

16
admin.go Normal file
View File

@ -0,0 +1,16 @@
package main
import (
"fmt"
"net/http"
"github.com/julienschmidt/httprouter"
)
func AdminRoutes(router *httprouter.Router) {
p := "/admin/" // prefix
router.GET(p + "foo", AdminFoo)
}
func AdminFoo(w http.ResponseWriter, _ *http.Request, _ httprouter.Params) {
fmt.Fprintf(w, "Adminpanel not implemented yet!")
}

View File

@ -55,8 +55,8 @@ func main() {
defer DB.Close()
router := httprouter.New()
define_routes(router)
Routes(router)
AdminRoutes(router)
start_server(config, router)
}