Added Controller Endpoints for reserve, release and confirm
This commit is contained in:
parent
ffd99d7938
commit
e2697cee5b
@ -2,12 +2,11 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gittea.marcokittel.de/elio/eliotools/datawriter/internal/api"
|
||||
"gittea.marcokittel.de/elio/eliotools/datawriter/internal/database"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"gittea.marcokittel.de/elio/eliotools/datawriter/internal/api"
|
||||
"gittea.marcokittel.de/elio/eliotools/datawriter/internal/database"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -27,7 +26,17 @@ func main() {
|
||||
return
|
||||
}
|
||||
//Dependency Injection
|
||||
http.HandleFunc("/api/products", api.GetProductApiHandleFunc(nps))
|
||||
http.HandleFunc("/api/products$", api.GetProductApiHandleFunc(nps))
|
||||
http.HandleFunc("/api/products/reserve", func(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Println("In Arbeit: reserve")
|
||||
})
|
||||
http.HandleFunc("/api/products/confirm", func(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Println("In Arbeit: confirm")
|
||||
})
|
||||
http.HandleFunc("/api/products/release", func(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Println("In Arbeit: release")
|
||||
})
|
||||
|
||||
log.Printf("Easy Peasy: Die Party startet auf Port %s\n", port)
|
||||
log.Printf("Probiers mal damit: %s\n", curlhelp)
|
||||
log.Fatal(http.ListenAndServe(port, nil))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user