init
This commit is contained in:
29
api/router.go
Normal file
29
api/router.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
func NewRouter() *mux.Router {
|
||||
router := mux.NewRouter().StrictSlash(true)
|
||||
|
||||
// Auktionen
|
||||
router.HandleFunc("/api/v1/auctions/{id}", GetAuction).Methods("GET")
|
||||
router.HandleFunc("/api/v1/auctions", CreateAuction).Methods("POST")
|
||||
router.HandleFunc("/api/v1/auctions", ListAuctions).Methods("GET")
|
||||
|
||||
// Karten
|
||||
router.HandleFunc("/api/v1/cards/{id}", GetCard).Methods("GET")
|
||||
router.HandleFunc("/api/v1/cards", CreateCard).Methods("POST")
|
||||
|
||||
// Bewertung
|
||||
router.HandleFunc("/api/v1/value/{auction_id}", GetCardValue).Methods("GET")
|
||||
|
||||
// Lookup-Tabellen
|
||||
router.HandleFunc("/api/v1/platforms", GetPlatforms).Methods("GET")
|
||||
router.HandleFunc("/api/v1/currencies", GetCurrencies).Methods("GET")
|
||||
/*router.HandleFunc("/api/v1/autograph-types", GetAutographTypes).Methods("GET")
|
||||
router.HandleFunc("/api/v1/misprint-types", GetMisprintTypes).Methods("GET")*/
|
||||
|
||||
return router
|
||||
}
|
Reference in New Issue
Block a user