Update ApiV1Dot1Controller

This commit is contained in:
Daniel Supernault 2023-07-30 04:01:29 -06:00
parent f54cf0b2d7
commit 3b885709b8
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -869,8 +869,10 @@ class ApiV1Dot1Controller extends Controller
]);
$field = $request->input('field');
$value = $request->input('value');
$settings = UserSetting::whereUserId($request->user()->id)->first();
if(!$settings) {
$settings = UserSetting::firstOrCreate([
'user_id' => $request->user()->id
]);
if(!$settings->other) {
$other = [];
} else {
$other = $settings->other;