Skip to content

Commit

Permalink
fix: declare json output as object
Browse files Browse the repository at this point in the history
  • Loading branch information
dkaser committed Oct 16, 2024
1 parent 1bebbb3 commit 9161c26
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ public function __construct(Translator $tr)
public static function getStatus(): stdClass
{
exec("tailscale status --json", $out_status);
return json_decode(implode($out_status));
return (object) json_decode(implode($out_status));
}

public static function getPrefs(): stdClass
{
exec("tailscale debug prefs", $out_prefs);
return json_decode(implode($out_prefs));
return (object) json_decode(implode($out_prefs));
}

public static function getLock(): stdClass
{
exec("tailscale lock status -json=true", $out_status);
return json_decode(implode($out_status));
return (object) json_decode(implode($out_status));
}

public static function printRow(string $title, string $value): string
Expand Down

0 comments on commit 9161c26

Please sign in to comment.