SUPPORT-9055: fix and add home description

This commit is contained in:
adel.ka 2025-03-27 10:12:32 +03:00
parent 2b3cfb704e
commit 266ab7c09c

View file

@ -2,7 +2,6 @@ package ru.micord.ervu.audit.constants;
import java.util.Map;
import java.util.Optional;
/**
* @author Adel Kalimullin
@ -18,7 +17,8 @@ public final class AuditConstants {
"/", "Главная",
"/mydata", "Мои данные",
"/subpoena", "Повестки",
"/restriction", "Временные меры"
"/restriction", "Временные меры",
"/home", "Домашняя страница ЛК РП ФЛ"
);
private static final Map<String, String> downloadTypes = Map.of(
@ -27,14 +27,11 @@ public final class AuditConstants {
);
public static String getRouteDescription(String route) {
return Optional.ofNullable(routeDescriptions.get(route))
.orElseThrow(() -> new IllegalArgumentException("Invalid route :" + route));
return routeDescriptions.getOrDefault(route, "Неизвестный маршрут");
}
public static String getDownloadType(String formatRegistry) {
return Optional.ofNullable(downloadTypes.get(formatRegistry))
.orElseThrow(
() -> new IllegalArgumentException("Invalid formatRegistry :" + formatRegistry));
return downloadTypes.getOrDefault(formatRegistry, "Неизвестный формат");
}
private AuditConstants() {