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)