fix typo and add handlers to router

This commit is contained in:
2024-04-16 23:16:52 +02:00
parent eadfcd7afc
commit 12bb08d6ce
2 changed files with 5 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/vcscsvcscs/GenerationsHeritage/backend/memgraph"
)
func DelteRelationship(driver neo4j.DriverWithContext) gin.HandlerFunc {
func DeleteRelationship(driver neo4j.DriverWithContext) gin.HandlerFunc {
return func(c *gin.Context) {
var relationship memgraph.Relationship
if err := c.ShouldBindJSON(&relationship); err != nil {

View File

@@ -46,7 +46,11 @@ func main() {
router.GET("/health", hc.HealthCheckHandler())
router.GET("/person", handlers.ViewPerson(memgraphDriver))
router.POST("/createPerson", handlers.CreatePerson(memgraphDriver))
router.DELETE("/deletePerson", handlers.DeletePerson(memgraphDriver))
router.PUT("/updatePerson", handlers.UpdatePerson(memgraphDriver))
router.POST("/createRelationship", handlers.CreateRelationship(memgraphDriver))
router.DELETE("/deleteRelationship", handlers.DeleteRelationship(memgraphDriver))
router.PUT("/verifyRelationship", handlers.VerifyRelationship(memgraphDriver))
server := utilities.SetupHttpsServer(router, *cert, *key, *httpsPort, *httpPort, requestTimeout)