SUPPORT-9055: fix and add home description
This commit is contained in:
parent
2b3cfb704e
commit
266ab7c09c
1 changed files with 4 additions and 7 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue