Get rid of deprecation warning in def like_json().

Rewrite queries in like_json() to get rid of
"DEPRECATION WARNING" in PostController.