feat(P1): Account 模型扩展 + 头像上传 + 个人简介 + Refresh Token 机制
This commit is contained in:
@@ -41,12 +41,15 @@ func SetRouter(db *gorm.DB, cache *rediscache.Client, rmq *rabbitmq.RabbitMQ) *g
|
||||
accountGroup.POST("/changePassword", accountHandler.ChangePassword)
|
||||
accountGroup.POST("/findByID", accountHandler.FindByID)
|
||||
accountGroup.POST("/findByUsername", accountHandler.FindByUsername)
|
||||
accountGroup.POST("/refresh", accountHandler.Refresh)
|
||||
}
|
||||
protectedAccountGroup := accountGroup.Group("")
|
||||
protectedAccountGroup.Use(jwt.JWTAuth(accountRepository, cache))
|
||||
{
|
||||
protectedAccountGroup.POST("/logout", accountHandler.Logout)
|
||||
protectedAccountGroup.POST("/rename", accountHandler.Rename)
|
||||
protectedAccountGroup.POST("/uploadAvatar", accountHandler.UploadAvatar)
|
||||
protectedAccountGroup.POST("/updateProfile", accountHandler.UpdateProfile)
|
||||
}
|
||||
// video
|
||||
videoRepository := video.NewVideoRepository(db)
|
||||
|
||||
Reference in New Issue
Block a user