diff --git a/controllers/route.go b/controllers/route.go index 1937da87..b1752efe 100644 --- a/controllers/route.go +++ b/controllers/route.go @@ -84,7 +84,6 @@ func Base(w http.ResponseWriter, r *http.Request) { Title string Flashes []interface{} }{Title: "Dashboard", User: ctx.Get(r, "user").(models.User)} - fmt.Println(params.User.Username) getTemplate(w, "dashboard").ExecuteTemplate(w, "base", params) } @@ -93,7 +92,11 @@ func Users(w http.ResponseWriter, r *http.Request) { } func Settings(w http.ResponseWriter, r *http.Request) { - getTemplate(w, "settings").ExecuteTemplate(w, "base", nil) + params := struct { + User models.User + Title string + }{Title: "Settings", User: ctx.Get(r, "user").(models.User)} + getTemplate(w, "settings").ExecuteTemplate(w, "base", params) } func Campaigns(w http.ResponseWriter, r *http.Request) { diff --git a/templates/settings.html b/templates/settings.html index 9e0da64f..17995579 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -1,4 +1,4 @@ -{{define "content"}} {{template "nav"}} +{{define "content"}} {{template "nav" .User}}

@@ -20,10 +20,9 @@

-

Gophish API

-

Gophish runs on top of a RESTful API which allows developers to automate phishing campaigns easily. The following documentation and examples demonstrate the API functionality

-

/api/campaigns

-

Test.

+

User Settings

+

Username: {{.User.Username}}

+

Api Key: {{.User.APIKey}}

{{end}}