Skip to content

Commit

Permalink
Further Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaMicallefYBSU committed Aug 20, 2024
1 parent bcd9bbe commit a102502
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions app/Jobs/ProcessSessionLogging.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public function handle()
if($session->discord_id == null){
$discord = new DiscordClient();
$discord_id = $discord->ControllerConnection($controller->callsign, $name);
}

$session->discord_id = $discord_id;
$session->save();
$session->discord_id = $discord_id;
$session->save();
}

array_push($positionsFound, $controller->callsign);
}
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Network/SessionLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class SessionLog extends Model

public function user()
{
return $this->belongsTo(User::class);
return $this->belongsTo(User::class, 'cid', 'id');
}

public function position()
Expand Down
8 changes: 4 additions & 4 deletions app/Services/DiscordClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ public function ControllerConnection($callsign, $name)
"tts" => false,
"embeds" => [
[
'title' => $callsign.' Just Connected!',
'description' => 'A new controller has just connected to the network!
'title' => $callsign.' is currently online!',
'description' => 'There is currently ATC being provided over the Ocean!
Controller Name: '.$name.'
Online from: <t:'.Carbon::now()->timestamp.':t>',
**Controller:** '.$name.'
**Online from:** <t:'.Carbon::now()->timestamp.':t>',
'color' => hexdec('6EC40C'),
]
]
Expand Down

0 comments on commit a102502

Please sign in to comment.