Skip to content

Commit

Permalink
use / for request
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Jul 22, 2024
1 parent 6b3e82b commit fb61c50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ func (a *API) handleCreateRequest(jc jape.Context) {
// Serve serves the API on the provided listener.
func (a *API) Serve(l net.Listener) error {
router := jape.Mux(map[string]jape.Handler{
"GET /request/:id": a.handleGetRequest,
"POST /request": a.handleCreateRequest,
"GET /:id": a.handleGetRequest,
"POST /": a.handleCreateRequest,
})
handler := cors.New(cors.Options{
AllowedOrigins: []string{"*"},
Expand Down

0 comments on commit fb61c50

Please sign in to comment.