Move "testing" string into BadgeConfiguration

This commit is contained in:
Ehren Kret
2021-09-20 16:33:57 -05:00
parent 17e8b77e88
commit 3172b571c6
2 changed files with 7 additions and 1 deletions

View File

@@ -477,7 +477,7 @@ public class ProfileController {
// This is for testing badges and allows them to be added to an account at any time with an expiration of 1 day
// in the future.
BadgeConfiguration badgeConfiguration = badgeConfigurationMap.get(badgeId);
if (badgeConfiguration != null && "testing".equals(badgeConfiguration.getCategory())) {
if (badgeConfiguration != null && badgeConfiguration.isTestBadge()) {
result.put(badgeId, new AccountBadge(badgeId, clock.instant().plus(Duration.ofDays(1)), true));
continue;
}