1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 17:26:43 +00:00

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'); $field = $request->input('field');
$value = $request->input('value'); $value = $request->input('value');
$settings = UserSetting::whereUserId($request->user()->id)->first(); $settings = UserSetting::firstOrCreate([
if(!$settings) { 'user_id' => $request->user()->id
]);
if(!$settings->other) {
$other = []; $other = [];
} else { } else {
$other = $settings->other; $other = $settings->other;