Skip to content

Commit

Permalink
allow website admins to accept beatmaps on behalf of other nominators
Browse files Browse the repository at this point in the history
  • Loading branch information
Shmiklak committed Jun 13, 2024
1 parent 3d9ab42 commit e0de736
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions app/Http/Controllers/NominatorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ class NominatorController extends Controller
public function update_response(Request $request) {
$this->validate($request, [
'request_id' => 'required',
'nominator_id' => 'required',
'comment' => 'sometimes',
'status' => 'required'
]);

$nominator_id = $request->get('nominator_id');
$nominator_id = $request->has('nominator_id') ? $request->get('nominator_id') : auth()->user()->id;

$response = NominatorResponse::where('nominator_id', $nominator_id)->where('request_id', $request->get('request_id'))->first();

Expand Down
2 changes: 1 addition & 1 deletion resources/js/Components/NominatorResponseForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const NominatorResponseForm = (props) => {

const { data, setData, post, processing, errors, reset } = useForm({
request_id: props.request_id,
nominator_id: props.auth.id,
nominator_id: props.auth.user.id,
comment: '',
status: 'UNINTERESTED'
});
Expand Down

0 comments on commit e0de736

Please sign in to comment.