Skip to content

Commit

Permalink
Update usersetting to accept config value as array
Browse files Browse the repository at this point in the history
  • Loading branch information
Mh-Asmi committed Dec 14, 2023
1 parent aca8b39 commit 451f149
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Ushahidi/Core/Entity/UserSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected function getDefinition()
'id' => 'int',
'user_id' => 'int',
'config_key' => 'string',
'config_value' => 'string',
// 'config_value' => 'string',
'created' => 'int',
'updated' => 'int',
];
Expand Down
4 changes: 2 additions & 2 deletions src/Ushahidi/Modules/V5/Requests/UserSettingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function rules(Request $request)
'min:3',
'max:255'
],
'config_value' => ['required', 'string', 'min:3', 'max:255'],
'config_value' => ['required'],
];
} elseif ($request->isMethod('put')) {
return [
Expand All @@ -43,7 +43,7 @@ public function rules(Request $request)
'min:3',
'max:255'
],
'config_value' => ['filled', 'string', 'min:3', 'max:255'],
'config_value' => ['filled', 'min:3', 'max:255'],
];
} else {
return [];
Expand Down

0 comments on commit 451f149

Please sign in to comment.