From 2da80d470a343aafebd5419f82789fb425839343 Mon Sep 17 00:00:00 2001 From: AustrianToast Date: Sun, 14 Apr 2024 20:52:06 +0200 Subject: [PATCH] some progress I am currently following a video guide --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 340b915..4089c01 100644 --- a/main.go +++ b/main.go @@ -35,6 +35,7 @@ func main() { router := gin.Default() router.SetTrustedProxies(nil) + router.POST("/upload", ReceiveFile) router.GET("/videos", getvideos) router.GET("/videos/:id", getvideoByID) router.POST("/videos", postvideos) @@ -45,6 +46,10 @@ func main() { router.Run("localhost:8080") } +func ReceiveFile(c *gin.Context) { + c.IndentedJSON(http.StatusOK, "Received successfully") +} + // getvideos responds with the list of all videos as JSON. func getvideos(c *gin.Context) { c.IndentedJSON(http.StatusOK, videos)