Skip to content

Commit

Permalink
Merge pull request #28 from snupsplus/main
Browse files Browse the repository at this point in the history
Updating of npm/yarn packages and fixes for grammer in Approve/Denied Flash text
  • Loading branch information
itinerare authored Oct 14, 2020
2 parents 0f34219 + 483934f commit b083b8b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ npm-debug.log
yarn-error.log
/composer.lock
*.env
/.idea
13 changes: 5 additions & 8 deletions app/Http/Controllers/Admin/Characters/CharacterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ public function getCreateMyo()
]);
}





/**
* Shows the edit image subtype portion of the modal
*
Expand All @@ -100,9 +96,6 @@ public function getCreateCharacterMyoSubtype(Request $request) {
]);
}




/**
* Creates a character.
*
Expand Down Expand Up @@ -575,7 +568,11 @@ public function postTransferQueue(Request $request, CharacterManager $service, $
$action = $request->get('action');

if($service->processTransferQueue($request->only(['action', 'cooldown', 'reason']) + ['transfer_id' => $id], Auth::user())) {
flash('Transfer ' . strtolower($action) . 'ed.')->success();
if (strtolower($action) == 'approve') {
flash('Transfer ' . strtolower($action) . 'd.')->success();
} else {
flash('Transfer ' . strtolower($action) . 'ed.')->success();
}
}
else {
foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
Expand Down
13 changes: 9 additions & 4 deletions app/Http/Controllers/Users/CharacterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getIndex()
'characters' => $characters,
]);
}

/**
* Shows the user's MYO slots.
*
Expand Down Expand Up @@ -109,7 +109,7 @@ public function getTransfers($type = 'incoming')
'transfersQueue' => Settings::get('open_transfers_queue'),
]);
}

/**
* Transfers one of the user's own characters.
*
Expand All @@ -123,12 +123,17 @@ public function postHandleTransfer(Request $request, CharacterManager $service,
if(!Auth::check()) abort(404);

$action = $request->get('action');

if($action == 'Cancel' && $service->cancelTransfer(['transfer_id' => $id], Auth::user())) {
flash('Transfer cancelled.')->success();
}
else if($service->processTransfer($request->only(['action']) + ['transfer_id' => $id], Auth::user())) {
flash('Transfer ' . strtolower($action) . 'ed.')->success();
if(strtolower($action) == 'approve'){
flash('Transfer ' . strtolower($action) . 'd.')->success();
}
else {
flash('Transfer ' . strtolower($action) . 'ed.')->success();
}
}
else {
foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
Expand Down

0 comments on commit b083b8b

Please sign in to comment.