refactor(badges): use modal REST routes

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-05 00:16:39 +08:00
co-authored by Claude Fable 5
parent 34150f3358
commit 25ce1d8f43
2 changed files with 51 additions and 41 deletions
+2 -2
View File
@@ -347,8 +347,8 @@
var data = r.json && r.json.data;
var isSelf = data && data.is_self;
if (isSelf && data.wear) {
refreshed = (window.aksrtData && window.aksrtData.ajaxUrl)
? window.aksrtData.ajaxUrl + '?action=aksrt_single_badge_info_modal&name=' + encodeURIComponent(data.wear) + '&user_id=' + (uid || 0)
refreshed = uid > 0 && data.wear
? window.AksrtRequest.url('/users/' + uid + '/badges/' + encodeURIComponent(data.wear) + '/modal')
: null;
}
} catch (_) {}