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) {
 | 
			
		||||
	log := zlog.Ctx(r.Context())
 | 
			
		||||
	cfg := config.FromContext(r.Context())
 | 
			
		||||
 | 
			
		||||
	id := chi.URLParam(r, "id")
 | 
			
		||||
	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.AppName = fmt.Sprintf("%s v%s", cfg.GetString("app-name"), cfg.GetString("app-version"))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	// Wait for either entity to resolve or timeout
 | 
			
		||||
	select {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,7 @@
 | 
			
		||||
package keyproofs
 | 
			
		||||
 | 
			
		||||
type page struct {
 | 
			
		||||
	AppName string
 | 
			
		||||
	Entity *Entity
 | 
			
		||||
	Style  *Style
 | 
			
		||||
	Proofs *Proofs
 | 
			
		||||
@ -173,7 +174,7 @@ var pageTPL = `
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
		<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>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user