From 8dd07c0ddd99ae626a1ec8c06f75f27fed51269f Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 26 Jul 2014 00:24:27 -0400 Subject: New UI merge in progress --- routers/dev/debug.go | 4 ++-- routers/dev/template.go | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'routers/dev') diff --git a/routers/dev/debug.go b/routers/dev/debug.go index 62022146ad..6ef40a6226 100644 --- a/routers/dev/debug.go +++ b/routers/dev/debug.go @@ -7,10 +7,10 @@ package dev import ( "net/http/pprof" - "github.com/go-martini/martini" + "github.com/Unknwon/macaron" ) -func RegisterDebugRoutes(r martini.Router) { +func RegisterDebugRoutes(r *macaron.Macaron) { r.Any("/debug/pprof/cmdline", pprof.Cmdline) r.Any("/debug/pprof/profile", pprof.Profile) r.Any("/debug/pprof/symbol", pprof.Symbol) diff --git a/routers/dev/template.go b/routers/dev/template.go index da477c94c0..e4f2429ae9 100644 --- a/routers/dev/template.go +++ b/routers/dev/template.go @@ -5,15 +5,13 @@ package dev import ( - "github.com/go-martini/martini" - "github.com/gogits/gogs/models" "github.com/gogits/gogs/modules/base" "github.com/gogits/gogs/modules/middleware" "github.com/gogits/gogs/modules/setting" ) -func TemplatePreview(ctx *middleware.Context, params martini.Params) { +func TemplatePreview(ctx *middleware.Context) { ctx.Data["User"] = models.User{Name: "Unknown"} ctx.Data["AppName"] = setting.AppName ctx.Data["AppVer"] = setting.AppVer @@ -23,5 +21,5 @@ func TemplatePreview(ctx *middleware.Context, params martini.Params) { ctx.Data["ActiveCodeLives"] = setting.Service.ActiveCodeLives / 60 ctx.Data["ResetPwdCodeLives"] = setting.Service.ResetPwdCodeLives / 60 ctx.Data["CurDbValue"] = "" - ctx.HTML(200, base.TplName(params["_1"])) + ctx.HTML(200, base.TplName(ctx.Params("*"))) } -- cgit v1.2.3