feat: ✨ preliminary work on revised Post system
Some checks reported warnings
/ phplint (push) Has been cancelled
Some checks reported warnings
/ phplint (push) Has been cancelled
This commit is contained in:
parent
b8e449006b
commit
0f2761cd61
4 changed files with 58 additions and 8 deletions
|
@ -225,7 +225,7 @@ function try_render_post($SURI) {
|
|||
$search_result = $adapter->perform_post_search($search_query);
|
||||
|
||||
$search_result = array_map(function($key) {
|
||||
$post = new PostData(null, $key);
|
||||
$post = new PostData($adapter, $key);
|
||||
return $post->data;
|
||||
}, $search_result['results']);
|
||||
|
||||
|
@ -285,7 +285,7 @@ function generate_website($SURI) {
|
|||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$post = new PostData(null, $adapter->get_post_by_path($match[1]));
|
||||
$post = new PostData($adapter, $adapter->get_post_by_path($match[1]));
|
||||
echo $post->to_json(with_markdown: true, with_html: true);
|
||||
|
||||
} elseif(preg_match('/^\/api\/subposts(.*)$/', $SURI, $match)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue