Commit f0aee215 authored by alexpott's avatar alexpott

Issue #1987196 by klausi: Simplify dblog REST resource.

parent a858b347
......@@ -48,9 +48,9 @@ public function routes() {
public function get($id = NULL) {
if ($id) {
$record = db_query("SELECT * FROM {watchdog} WHERE wid = :wid", array(':wid' => $id))
->fetchObject();
->fetchAssoc();
if (!empty($record)) {
return new ResourceResponse((array) $record);
return new ResourceResponse($record);
}
}
throw new NotFoundHttpException(t('Log entry with ID @id was not found', array('@id' => $id)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment