update: route data struct & remove google analytics

This commit is contained in:
tokumeikoi
2022-12-17 21:37:08 +08:00
parent 5fc49dc840
commit 99311e12a5
12 changed files with 84 additions and 15 deletions

View File

@ -221,7 +221,14 @@ class ServerService
public function getRoutes(array $routeIds)
{
return ServerRoute::select(['id', 'match', 'action', 'action_value'])->whereIn('id', $routeIds)->get();
$routes = ServerRoute::select(['id', 'match', 'action', 'action_value'])->whereIn('id', $routeIds)->get();
// TODO: remove on 1.8.0
foreach ($routes as $k => $route) {
$array = json_decode($route->match, true);
if (is_array($array)) $routes[$k]['match'] = $array;
}
// TODO: remove on 1.8.0
return $routes;
}
public function getServer($serverId, $serverType)