add app name and version
This commit is contained in:
parent
2b0b454063
commit
7d1463296d
|
@ -86,6 +86,7 @@ func fmtKey(key promise.Key) string {
|
||||||
|
|
||||||
func (s *identity) get(w http.ResponseWriter, r *http.Request) {
|
func (s *identity) get(w http.ResponseWriter, r *http.Request) {
|
||||||
log := zlog.Ctx(r.Context())
|
log := zlog.Ctx(r.Context())
|
||||||
|
cfg := config.FromContext(r.Context())
|
||||||
|
|
||||||
id := chi.URLParam(r, "id")
|
id := chi.URLParam(r, "id")
|
||||||
log.Debug().Str("get ", id).Send()
|
log.Debug().Str("get ", id).Send()
|
||||||
|
@ -172,6 +173,8 @@ func (s *identity) get(w http.ResponseWriter, r *http.Request) {
|
||||||
})
|
})
|
||||||
|
|
||||||
page := page{Style: defaultStyle}
|
page := page{Style: defaultStyle}
|
||||||
|
page.AppName = fmt.Sprintf("%s v%s", cfg.GetString("app-name"), cfg.GetString("app-version"))
|
||||||
|
|
||||||
|
|
||||||
// Wait for either entity to resolve or timeout
|
// Wait for either entity to resolve or timeout
|
||||||
select {
|
select {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package keyproofs
|
package keyproofs
|
||||||
|
|
||||||
type page struct {
|
type page struct {
|
||||||
|
AppName string
|
||||||
Entity *Entity
|
Entity *Entity
|
||||||
Style *Style
|
Style *Style
|
||||||
Proofs *Proofs
|
Proofs *Proofs
|
||||||
|
@ -173,7 +174,7 @@ var pageTPL = `
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-footer text-muted text-center">
|
<div class="card-footer text-muted text-center">
|
||||||
© 2020 Sour.is | <a href="/id/me@sour.is">About me</a> | <a href="https://github.com/sour-is/keyproofs">GitHub</a> | Inspired by <a href="https://keyoxide.org/">keyoxide</a>
|
{{.AppName}} | © 2020 Sour.is | <a href="/id/me@sour.is">About me</a> | <a href="https://github.com/sour-is/keyproofs">GitHub</a> | Inspired by <a href="https://keyoxide.org/">keyoxide</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user