From 499c54e8eb53cf49d8ddae68528eb3a8243101d2 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Wed, 5 May 2021 10:20:41 +0530 Subject: fixed broken API routes and css glitch in form --- server/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server') diff --git a/server/main.go b/server/main.go index 49d8c45..8b400fe 100644 --- a/server/main.go +++ b/server/main.go @@ -35,13 +35,13 @@ func main() { items := api.Group("/items") // items API routes - items.GET("/", getAllItems) - items.POST("/", registerItem) + items.GET("/get-all", getAllItems) + items.POST("/register", registerItem) // people API routes - people.GET("/", getAllPeople) - people.POST("/", registerPerson) + people.GET("/get-all", getAllPeople) + people.POST("/register", registerPerson) myRouter.Run(":8080") } @@ -75,7 +75,7 @@ func registerItem(ctx *gin.Context) { // people API functions func getAllPeople(ctx *gin.Context) { - ctx.Header("Content-Type", "application/json") + // ctx.Header("Content-Type", "application/json") ctx.JSON(http.StatusOK, db.GetAllPeople()) } -- cgit v1.2.3