fix(server): update skill visibility on each version publish

This commit is contained in:
yun-zhi-ztl 2026-03-19 13:53:30 +08:00 committed by Xudong Sun
parent 7d8915fc7a
commit ea75670224

View file

@ -236,6 +236,9 @@ public class SkillPublishService {
return skillRepository.save(newSkill);
});
// Update visibility to match the latest publish request
skill.setVisibility(visibility);
if (skill.getStatus() == SkillStatus.ARCHIVED) {
throw new DomainBadRequestException("error.skill.publish.archived", skillSlug);
}