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

     1  // Copyright 2019 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 screenshot
     6  
     7  import "github.com/web-platform-tests/wpt.fyi/shared"
     8  
     9  // RegisterRoutes adds all the screenshot route handlers.
    10  func RegisterRoutes() {
    11  	// API endpoint for getting a list of recent screenshot hashes.
    12  	shared.AddRoute("/api/screenshots/hashes", "api-screenshots-hashes",
    13  		shared.WrapApplicationJSON(getHashesHandler))
    14  
    15  	// PRIVATE API endpoint for creating a screenshot.
    16  	// Only this AppEngine project can access.
    17  	shared.AddRoute("/api/screenshots/upload", "api-screenshots-upload", uploadScreenshotHandler)
    18  }