changed api_response signature
This commit is contained in:
@@ -48,7 +48,7 @@ final class Index
|
||||
$response['backends'][] = $backend;
|
||||
}
|
||||
|
||||
return api_response($response, HTTP_STATUS::HTTP_OK, []);
|
||||
return api_response(HTTP_STATUS::HTTP_OK, $response, []);
|
||||
}
|
||||
|
||||
public static function getBackends(string|null $name = null, bool $blacklist = false): array
|
||||
|
||||
@@ -35,8 +35,8 @@ final class View
|
||||
'list' => (string)$apiUrl->withPath(parseConfigValue(self::URL)),
|
||||
],
|
||||
];
|
||||
|
||||
return api_response(['backend' => $response], HTTP_STATUS::HTTP_OK, []);
|
||||
|
||||
return api_response(HTTP_STATUS::HTTP_OK, ['backend' => $response], []);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -314,6 +314,6 @@ final class Index
|
||||
$response['history'][] = $item;
|
||||
}
|
||||
|
||||
return api_response($response, HTTP_STATUS::HTTP_OK, []);
|
||||
return api_response(HTTP_STATUS::HTTP_OK, $response, []);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,6 @@ final readonly class View
|
||||
],
|
||||
];
|
||||
|
||||
return api_response(['history' => $item], HTTP_STATUS::HTTP_OK, []);
|
||||
return api_response(HTTP_STATUS::HTTP_OK, ['history' => $item], []);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +71,6 @@ final class Env
|
||||
];
|
||||
}
|
||||
|
||||
return api_response($response, HTTP_STATUS::HTTP_OK, []);
|
||||
return api_response(HTTP_STATUS::HTTP_OK, $response, []);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ final class Index
|
||||
$response['tasks'][] = $task;
|
||||
}
|
||||
|
||||
return api_response($response, HTTP_STATUS::HTTP_OK, []);
|
||||
return api_response(HTTP_STATUS::HTTP_OK, $response, []);
|
||||
}
|
||||
|
||||
public static function formatTask(array $task): array
|
||||
|
||||
@@ -35,6 +35,6 @@ final class View
|
||||
],
|
||||
];
|
||||
|
||||
return api_response(['task' => $response], HTTP_STATUS::HTTP_OK);
|
||||
return api_response(HTTP_STATUS::HTTP_OK, ['task' => $response]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user