github.com/web-platform-tests/wpt.fyi@v0.0.0-20240530210107-70cf978996f1/webapp/about_handler.go (about)

     1  // Copyright 2017 The WPT Dashboard Project. All rights reserved.
     2  // Use of this source code is governed by a BSD-style license that can be
     3  // found in the LICENSE file.
     4  
     5  package webapp
     6  
     7  import (
     8  	"net/http"
     9  
    10  	"github.com/web-platform-tests/wpt.fyi/shared"
    11  )
    12  
    13  func aboutHandler(w http.ResponseWriter, r *http.Request) {
    14  	ctx := r.Context()
    15  	aeAPI := shared.NewAppEngineAPI(ctx)
    16  	version := aeAPI.GetVersion()
    17  
    18  	data := struct {
    19  		Version string
    20  	}{
    21  		Version: version,
    22  	}
    23  	RenderTemplate(w, r, "about.html", data)
    24  }