refactor(loyalty): remove the dead customer points and tokens code
First part of PC-601 (docs/prd-point-coin.md §10.7): the code that has had no way in since balances moved to the wallet. - The /marketing/customer-points and /marketing/customer-tokens routes were commented out; their 16 handler methods, the GamificationService methods behind them, and the validators, transformers, mappers and contract/model types only they used are gone. - CustomerPointsProcessor loses its "not implemented" stubs; it keeps the customer app's balance, wallet and games endpoints. - CustomerTokensProcessor and the customer points and tokens repositories, wired but no longer called by anything, are gone. What stays until its preconditions are met: the customer_points and customer_tokens tables and their entities, which cmd/wallet-migrate still reads, and the /customer/points, /customer/tokens aliases and the token_used / tokens_remaining fields, until the apps no longer use them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
550122f29c
commit
d1e543a79f
@@ -542,31 +542,6 @@ func (r *Router) addAppRoutes(rg *gin.Engine) {
|
||||
gamification := protected.Group("/marketing")
|
||||
gamification.Use(r.authMiddleware.RequireAdminOrManager())
|
||||
{
|
||||
//customerPoints := gamification.Group("/customer-points")
|
||||
//{
|
||||
// customerPoints.POST("", r.gamificationHandler.CreateCustomerPoints)
|
||||
// customerPoints.GET("", r.gamificationHandler.ListCustomerPoints)
|
||||
// customerPoints.GET("/:id", r.gamificationHandler.GetCustomerPoints)
|
||||
// customerPoints.PUT("/:id", r.gamificationHandler.UpdateCustomerPoints)
|
||||
// customerPoints.DELETE("/:id", r.gamificationHandler.DeleteCustomerPoints)
|
||||
// customerPoints.GET("/customer/:customer_id", r.gamificationHandler.GetCustomerPointsByCustomerID)
|
||||
// customerPoints.POST("/customer/:customer_id/add", r.gamificationHandler.AddCustomerPoints)
|
||||
// customerPoints.POST("/customer/:customer_id/deduct", r.gamificationHandler.DeductCustomerPoints)
|
||||
//}
|
||||
|
||||
// Customer Tokens
|
||||
//customerTokens := gamification.Group("/customer-tokens")
|
||||
//{
|
||||
// customerTokens.POST("", r.gamificationHandler.CreateCustomerTokens)
|
||||
// customerTokens.GET("", r.gamificationHandler.ListCustomerTokens)
|
||||
// customerTokens.GET("/:id", r.gamificationHandler.GetCustomerTokens)
|
||||
// customerTokens.PUT("/:id", r.gamificationHandler.UpdateCustomerTokens)
|
||||
// customerTokens.DELETE("/:id", r.gamificationHandler.DeleteCustomerTokens)
|
||||
// customerTokens.GET("/customer/:customer_id/type/:token_type", r.gamificationHandler.GetCustomerTokensByCustomerIDAndType)
|
||||
// customerTokens.POST("/customer/:customer_id/type/:token_type/add", r.gamificationHandler.AddCustomerTokens)
|
||||
// customerTokens.POST("/customer/:customer_id/type/:token_type/deduct", r.gamificationHandler.DeductCustomerTokens)
|
||||
//}
|
||||
|
||||
// Tiers
|
||||
tiers := gamification.Group("/tiers")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user