From 2e16304facef7796758e35646ee2dbd08d971021 Mon Sep 17 00:00:00 2001 From: Jan Barfuss Date: Fri, 20 Dec 2024 15:30:37 +0100 Subject: [PATCH] removed not used placeholders --- server/server.go | 6 +++--- server/user.go | 31 ------------------------------- 2 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 server/user.go diff --git a/server/server.go b/server/server.go index f36dcc4..d5dad9f 100644 --- a/server/server.go +++ b/server/server.go @@ -59,10 +59,10 @@ func Run(env map[string]string, db *database.DB) { //User v1.GET("/User/", checkAuth, getUserProfile) - v1.POST("/NewUser", createUser, newUser) + v1.POST("/NewUser", createUser) v1.POST("/AuthenticateUser", authenticateUser) - v1.PUT("/UpdateUser/:UserID", checkAuth, updateUser) - v1.DELETE("/DeleteUser/:UserID", checkAuth, deleteUser) + v1.PUT("/UpdateUser/:UserID", checkAuth) + v1.DELETE("/DeleteUser/:UserID", checkAuth) } r.GET("/ping", func(c *gin.Context) { diff --git a/server/user.go b/server/user.go deleted file mode 100644 index 2aed3b8..0000000 --- a/server/user.go +++ /dev/null @@ -1,31 +0,0 @@ -package server - -import ( - "net/http" - - "github.com/gin-gonic/gin" -) - -func getUser(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{ - "message": "getUser", - }) -} - -func newUser(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{ - "message": "newUser", - }) -} - -func updateUser(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{ - "message": "updateUser", - }) -} - -func deleteUser(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{ - "message": "deleteUser", - }) -}