Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Feeback #156

Merged
merged 2 commits into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/Http/Controllers/PilotIvaoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ public function getApideparturePilot($icao)
$api = $this->whazzup();
$count = $api["connections"]["pilot"];
$pilot = $api["clients"]["pilots"];
//dd($pilot[0]["flightPlan"]["departureId"]);
$pilotDeparture = [];
for ($i = 0; $i <= $count; $i++) {
foreach ($pilot as $key => $value) {
foreach ($pilot as $i => $value) {
if ($value["flightPlan"]["departureId"] == $icao) {
array_push($pilotDeparture, $value);
}
Expand All @@ -39,7 +40,7 @@ public function getApiArrivalPilot($icao)
$pilot = $api["clients"]["pilots"];
$PilotArrival = [];
for ($i = 0; $i <= $count; $i++) {
foreach ($pilot as $key => $value) {
foreach ($pilot as $i => $value) {
if ($value["flightPlan"]["arrivalId"] == $icao) {
array_push($PilotArrival, $value);
}
Expand Down
20 changes: 14 additions & 6 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Mail;
use Monolog\Formatter\JsonFormatter;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AtcController;
use Illuminate\Support\Facades\Session;
Expand Down Expand Up @@ -602,13 +603,14 @@

Route::post("create", function (Request $request) {
$github = new GithubController();
// dd($request);
// $request->merge([
// "user_id" => Auth::user()->id ?? null,
// "body" => $request->body,
// "link" => $github,
// "label" => $request->label
// ]);
$github = $github->send_issue($request);
$request->merge([
"user_id" => Auth::user()->id ?? null,
"body" => $request->body,
"link" => $github,
"label" => $request->label
]);
$discord = new DiscordContoller();
$discord->send_feedback($request);
return to_route("feedback.index")->with("success", "Votre feedback à été envoyé !");
Expand Down Expand Up @@ -670,4 +672,10 @@
return $event_world;

})->name("event.index");

Route::get("crypt", function (Request $request) {
$encrypted = Crypt::encryptString('la vie de devs est cool.');
$decrypted = Crypt::decryptString("eyJpdiI6Ik94UDRsMlR4NGRSWHVjazljTXJhQVE9PSIsInZhbHVlIjoiWlZWdGNNdXZabDFlTGQrLzRTVytwejFtV25MRGVibk1IUXB2bDZwVEF2ST0iLCJtYWMiOiJkZmVkOTNhZWM2NmY2MTEyNjhjYjYyMDZiN2FjM2I3MmMwZjY3ZGNiNTJjOTVmOGZiMjRlM2Q3ODE3NTU2ZDQ1IiwidGFnIjoiIn0=");
dd($decrypted);
})->name("crypto");
});
Loading