chore(cordis): sync Wavelet core/pkg/plugins after W1-W9

This commit is contained in:
ryan
2026-08-30 11:46:58 +08:00
parent dd333643f2
commit e847a7adb3
39 changed files with 1018 additions and 751 deletions
+16
View File
@@ -200,6 +200,22 @@ func ChangePassword(c *gin.Context) {
c.JSON(http.StatusOK, response.OKNil())
}
// Self returns the current authenticated user.
func Self(c *gin.Context) {
svc := getAuthService()
if svc == nil {
response.AbortUnauthorized(c, errUserNotFound)
return
}
user, err := svc.GetCurrentUser(c)
if err != nil {
logger.ErrorF(c.Request.Context(), "get current user failed: %v", err)
response.AbortUnauthorized(c, errUserNotFound)
return
}
c.JSON(http.StatusOK, response.OK(user))
}
// UpdateProfile updates profile info.
func UpdateProfile(c *gin.Context) {
var req updateProfileRequest