14 lines
		
	
	
		
			512 B
		
	
	
	
		
			Go
		
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			512 B
		
	
	
	
		
			Go
		
	
	
	
package web
 | 
						|
 | 
						|
import (
 | 
						|
	"github.com/gorilla/mux"
 | 
						|
)
 | 
						|
 | 
						|
func (ws *WebServer) setupAPIRoutes(r *mux.Router) {
 | 
						|
	api_router := r.PathPrefix("/api").Subrouter()
 | 
						|
	api_router.HandleFunc("/", ws.webAPIHandler.NotFound)
 | 
						|
	api_router.HandleFunc("/geo/autocomplete", ws.webAPIHandler.GeoAutocomplete)
 | 
						|
	api_router.HandleFunc("/cache/{cacheid}", ws.webAPIHandler.GetCache)
 | 
						|
	api_router.HandleFunc("/cache/{cacheid}/export", ws.webAPIHandler.CacheExport)
 | 
						|
	api_router.HandleFunc("/oauth2/callback", ws.webAPIHandler.OAuth2Callback)
 | 
						|
} |