mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-03-13 13:35:23 +01:00
18 lines
415 B
Go
18 lines
415 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// Handler returns an instance of httprouter.Router that handle APIs registered here
|
|
func (rt *_router) Handler() http.Handler {
|
|
// Register routes
|
|
rt.router.POST("/session", rt.wrap(rt.PostSession))
|
|
rt.router.GET("/", rt.getHelloWorld)
|
|
rt.router.GET("/context", rt.wrap(rt.getContextReply))
|
|
|
|
// Special routes
|
|
rt.router.GET("/liveness", rt.liveness)
|
|
|
|
return rt.router
|
|
}
|