Now with actually working calls.

このコミットが含まれているのは:
テクニカル諏訪子 2018-02-19 21:31:08 +09:00
コミット 1fc0b5db64
1個のファイルの変更26行の追加6行の削除

ファイルの表示

@ -124,17 +124,37 @@ class BoardController extends Controller {
}
public function getTopicStart($top_id) { // /api/rpc/board/post/gettopicstart/top_id
return DB::table('for_posts')
->select('MIN(user_id)', 'post_date')
$uid = DB::table('for_posts')
->where('top_id', $top_id)
->get();
->orderBy('post_date', 'asc')
->value('user_id');
$pdt = DB::table('for_posts')
->where('top_id', $top_id)
->orderBy('post_date', 'asc')
->value('post_date');
return array(
'uid' => $uid,
'date' => $pdt
);
}
public function getLastPost($top_id) { // /api/rpc/board/post/getlastpost/top_id
return DB::table('for_posts')
->select('MAX(user_id)', 'post_date')
$uid = DB::table('for_posts')
->where('top_id', $top_id)
->get();
->orderBy('post_date', 'desc')
->value('user_id');
$pdt = DB::table('for_posts')
->where('top_id', $top_id)
->orderBy('post_date', 'desc')
->value('post_date');
return array(
'uid' => $uid,
'date' => $pdt
);
}
public function countUnpinnedTopicsInForum($for_id) { // /api/rpc/board/topic/countunpinnedtopicsinforum/for_id