Add routes to handlers for expense group

This commit is contained in:
qowevisa 2024-11-16 11:43:32 +02:00
parent 2827a31fc9
commit 18aad2c225

View File

@ -88,6 +88,14 @@ func main() {
typesRoutes.PUT("/edit/:id", handlers.TypePutId)
typesRoutes.DELETE("/delete/:id", handlers.TypeDeleteId)
}
expensesRoutes := api.Group("/expense", middleware.AuthMiddleware())
{
expensesRoutes.POST("/add", handlers.ExpenseAdd)
expensesRoutes.GET("/:id", handlers.ExpenseGetId)
expensesRoutes.GET("/all", handlers.ExpenseGetAll)
expensesRoutes.PUT("/edit/:id", handlers.ExpensePutId)
expensesRoutes.DELETE("/delete/:id", handlers.ExpenseDeleteId)
}
}
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))