mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
fix: typo
This commit is contained in:
parent
684a2901c4
commit
7775ffae1e
4 changed files with 6 additions and 8 deletions
|
|
@ -39,7 +39,7 @@ class Device extends Model
|
|||
return round($percent);
|
||||
}
|
||||
|
||||
public function getWifiStrenghAttribute()
|
||||
public function getWifiStrengthAttribute()
|
||||
{
|
||||
$rssi = $this->last_rssi_level;
|
||||
if ($rssi >= 0) {
|
||||
|
|
|
|||
|
|
@ -236,9 +236,9 @@ new class extends Component {
|
|||
<span class="dark:text-zinc-200">{{$device->last_firmware_version}}</span>
|
||||
</flux:tooltip>
|
||||
@endif
|
||||
@if($device->wifiStrengh)
|
||||
@if($device->wifiStrength)
|
||||
<flux:separator vertical/>
|
||||
<x-responsive-icons.wifi :strength="$device->wifiStrengh" :rssi="$device->last_rssi_level"
|
||||
<x-responsive-icons.wifi :strength="$device->wifiStrength" :rssi="$device->last_rssi_level"
|
||||
class="dark:text-zinc-200"/>
|
||||
@endif
|
||||
@if($device->batteryPercent)
|
||||
|
|
|
|||
|
|
@ -209,10 +209,8 @@ Route::get('/display/status', function (Request $request) {
|
|||
$deviceId = $request['device_id'];
|
||||
abort_unless($request->user()->devices->contains($deviceId), 403);
|
||||
|
||||
$device = Device::where('id', $deviceId)->get()->first();
|
||||
|
||||
return response()->json(
|
||||
$device->only([
|
||||
Device::find($deviceId)->only([
|
||||
'id',
|
||||
'mac_address',
|
||||
'name',
|
||||
|
|
@ -221,7 +219,7 @@ Route::get('/display/status', function (Request $request) {
|
|||
'last_battery_voltage',
|
||||
'last_firmware_version',
|
||||
'battery_percent',
|
||||
'wifi_strengh',
|
||||
'wifi_strength',
|
||||
'current_screen_image',
|
||||
'default_refresh_interval',
|
||||
'updated_at',
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ test('wifi strength is determined correctly', function () {
|
|||
'last_rssi_level' => $case['rssi'],
|
||||
]);
|
||||
|
||||
expect($device->wifi_strengh)->toBe($case['expected'])
|
||||
expect($device->wifi_strength)->toBe($case['expected'])
|
||||
->and($device->last_rssi_level)->toBe($case['rssi']);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue