Merge branch 'apifixmore' of https://github.com/nakazawakan/kikikanri into frontend

このコミットが含まれているのは:
dragon1211 2021-10-29 21:49:46 +09:00
コミット dd832d0b10
1個のファイルの変更1行の追加1行の削除

ファイルの表示

@ -230,7 +230,7 @@ class FathersController extends Controller {
public function detail ($father_id) {
$father_select = ['image', 'email', 'tel', 'profile', 'company'];
if (null === ($result = Father::select($father_select)->where('id', (int)$father_id)->orderBy('created_at', 'desc')->get()->toArray())) {
if (null === ($result = Father::select($father_select)->where('id', (int)$father_id)->orderBy('created_at', 'desc')->first())) {
// 親詳細の取得に失敗
return ['status_code' => 400, 'error_messages' => ['親の更新に失敗しました。']];
}