diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-05-05 10:20:41 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-05-05 10:20:41 +0530 |
commit | 499c54e8eb53cf49d8ddae68528eb3a8243101d2 (patch) | |
tree | b0227990ac10376e51423a7886c69e54efa72a29 /server/main.go | |
parent | 4df6eaa913737427ddec2561c0ee8c9235f0c95f (diff) |
fixed broken API routes and css glitch in form
Diffstat (limited to 'server/main.go')
-rw-r--r-- | server/main.go | 10 |
1 files changed, 5 insertions, 5 deletions
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()) } |