This commit is contained in:
@@ -21,22 +21,18 @@ func SetupRoutes(r *gin.Engine) {
|
|||||||
api := r.Group("/api")
|
api := r.Group("/api")
|
||||||
api.Use(middleware.AuthMiddleware())
|
api.Use(middleware.AuthMiddleware())
|
||||||
{
|
{
|
||||||
// Health check for connection testing
|
|
||||||
api.GET("/health", handlers.HealthCheck)
|
api.GET("/health", handlers.HealthCheck)
|
||||||
|
|
||||||
// Sheets endpoints
|
|
||||||
sheets := api.Group("/sheets")
|
sheets := api.Group("/sheets")
|
||||||
{
|
{
|
||||||
sheets.POST("/upload", handlers.UploadSheet)
|
sheets.POST("/upload", handlers.UploadSheet)
|
||||||
sheets.GET("/list", handlers.ListSheets)
|
sheets.GET("/list", handlers.ListSheets)
|
||||||
sheets.GET("/get/:uuid", handlers.DownloadSheet)
|
sheets.GET("/get/:uuid", handlers.DownloadSheet)
|
||||||
|
|
||||||
// Annotations endpoints (nested under sheets)
|
|
||||||
sheets.GET("/:uuid/annotations", handlers.GetAnnotations)
|
sheets.GET("/:uuid/annotations", handlers.GetAnnotations)
|
||||||
sheets.POST("/:uuid/annotations", handlers.UpdateAnnotation)
|
sheets.POST("/:uuid/annotations", handlers.UpdateAnnotation)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Composers endpoints
|
|
||||||
composers := api.Group("/composers")
|
composers := api.Group("/composers")
|
||||||
{
|
{
|
||||||
composers.POST("/add", handlers.AddComposer)
|
composers.POST("/add", handlers.AddComposer)
|
||||||
|
|||||||
Reference in New Issue
Block a user