Add motivation quote feature to smoking tracking API
- Introduced a new database model `SmokeMotivationQuote` for storing motivational quotes. - Added a new API endpoint `GET /api/v1/smoke/motivation` to retrieve motivation quotes for users. - Updated the main.go file to include the new model in the auto-migration process. - Enhanced smoke_routes.go to register the new motivation route with the smoke handler.
This commit is contained in:
@@ -26,6 +26,7 @@ func registerSmokeRoutes(protected *gin.RouterGroup, smokeHandler *smokehandler.
|
||||
smoke.GET("/logs/:id", smokeHandler.Get)
|
||||
smoke.POST("/logs/:id", smokeHandler.Update)
|
||||
smoke.DELETE("/logs/:id", smokeHandler.Delete)
|
||||
smoke.GET("/motivation", smokeHandler.Motivation)
|
||||
|
||||
// AI 戒烟建议(会员优先;非会员需看广告解锁)
|
||||
smoke.GET("/ai/advice", smokeHandler.GetAIAdvice)
|
||||
|
||||
Reference in New Issue
Block a user