This is an automated email from the ASF dual-hosted git repository.
Aias00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new a1b6ae3290 fix: updateSk not publish event (#6434)
a1b6ae3290 is described below
commit a1b6ae3290cec2b30a0c2c1accbbe4f1073bc8fb
Author: kanlon <[email protected]>
AuthorDate: Thu Jul 23 07:27:37 2026 +0800
fix: updateSk not publish event (#6434)
Enhance updateAppSecretByAppKey to publish event on success.
Co-authored-by: aias00 <[email protected]>
---
.../apache/shenyu/admin/service/impl/AppAuthServiceImpl.java | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/AppAuthServiceImpl.java
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/AppAuthServiceImpl.java
index 28bec42744..6678d539ce 100644
---
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/AppAuthServiceImpl.java
+++
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/AppAuthServiceImpl.java
@@ -631,7 +631,17 @@ public class AppAuthServiceImpl implements AppAuthService {
@Override
public ShenyuAdminResult updateAppSecretByAppKey(final String appKey,
final String appSecret) {
- return
ShenyuAdminResult.success(appAuthMapper.updateAppSecretByAppKey(appKey,
appSecret));
+ int count = appAuthMapper.updateAppSecretByAppKey(appKey, appSecret);
+ if (count > 0) {
+ AppAuthDO appAuthDO = appAuthMapper.findByAppKey(appKey);
+ if (Objects.nonNull(appAuthDO)) {
+ AppAuthData appAuthData = buildByEntity(appAuthDO);
+ eventPublisher.publishEvent(new
DataChangedEvent(ConfigGroupEnum.APP_AUTH,
+ DataEventTypeEnum.UPDATE,
+ Lists.newArrayList(appAuthData)));
+ }
+ }
+ return ShenyuAdminResult.success(count);
}
@Override