mirror of https://github.com/gophish/gophish
Updated settings template and route to show basic user info
parent
c59415a133
commit
e9aa8d2c88
|
@ -84,7 +84,6 @@ func Base(w http.ResponseWriter, r *http.Request) {
|
||||||
Title string
|
Title string
|
||||||
Flashes []interface{}
|
Flashes []interface{}
|
||||||
}{Title: "Dashboard", User: ctx.Get(r, "user").(models.User)}
|
}{Title: "Dashboard", User: ctx.Get(r, "user").(models.User)}
|
||||||
fmt.Println(params.User.Username)
|
|
||||||
getTemplate(w, "dashboard").ExecuteTemplate(w, "base", params)
|
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) {
|
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) {
|
func Campaigns(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{define "content"}} {{template "nav"}}
|
{{define "content"}} {{template "nav" .User}}
|
||||||
<div class="jumbotron">
|
<div class="jumbotron">
|
||||||
<div class="container" style="text-align:center;">
|
<div class="container" style="text-align:center;">
|
||||||
<h1 class="sans header">
|
<h1 class="sans header">
|
||||||
|
@ -20,10 +20,9 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9 sans">
|
<div class="col-md-9 sans">
|
||||||
<h1 style="margin-top:0px"><i class="fa fa-gear"></i> Gophish API</h1>
|
<h1 style="margin-top:0px">User Settings</h1>
|
||||||
<p>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</p>
|
<p><b>Username:</b> {{.User.Username}}</p>
|
||||||
<h2 class="api_heading">/api/campaigns</h2>
|
<p><b>Api Key:</b> {{.User.APIKey}}</p>
|
||||||
<p>Test.</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
Loading…
Reference in New Issue