feat: able to check topup history & consumption history (#78, #95)

This commit is contained in:
JustSong
2023-06-09 16:59:00 +08:00
parent e0d0674f81
commit 45e9fd66e7
4 changed files with 136 additions and 0 deletions

View File

@@ -93,5 +93,10 @@ func SetApiRouter(router *gin.Engine) {
redemptionRoute.PUT("/", controller.UpdateRedemption)
redemptionRoute.DELETE("/:id", controller.DeleteRedemption)
}
logRoute := apiRouter.Group("/log")
logRoute.GET("/", middleware.AdminAuth(), controller.GetAllLogs)
logRoute.GET("/search", middleware.AdminAuth(), controller.SearchAllLogs)
logRoute.GET("/self", middleware.UserAuth(), controller.GetUserLogs)
logRoute.GET("/self/search", middleware.UserAuth(), controller.SearchUserLogs)
}
}