@@ -65,6 +65,8 @@ def object(self, request, pk=None):
65
65
"ebios_radar_green_zone_radius" : 0.2 ,
66
66
"ebios_radar_yellow_zone_radius" : 0.9 ,
67
67
"ebios_radar_red_zone_radius" : 2.5 ,
68
+ "notifications_enable_mailing" : False ,
69
+ "interface_agg_scenario_matrix" : False ,
68
70
}
69
71
70
72
settings , created = GlobalSettings .objects .get_or_create (name = "general" )
@@ -102,6 +104,24 @@ def ebios_radar_parameters(self, request):
102
104
}
103
105
return Response (ebios_rm_parameters )
104
106
107
+ @action (detail = True , name = "Get notifications settings" )
108
+ def notifications_settings (self , request ):
109
+ notifications_settings = {
110
+ "notifications_enable_mailing" : self .get_object ().value .get (
111
+ "notifications_enable_mailing"
112
+ ),
113
+ }
114
+ return Response (notifications_settings )
115
+
116
+ @action (detail = True , name = "Get interface settings" )
117
+ def interface_settings (self , request ):
118
+ interface_settings = {
119
+ "interface_agg_scenario_matrix" : self .get_object ().value .get (
120
+ "interface_agg_scenario_matrix"
121
+ ),
122
+ }
123
+ return Response (interface_settings )
124
+
105
125
106
126
@api_view (["GET" ])
107
127
@permission_classes ([permissions .AllowAny ])
0 commit comments