fix devops error

This commit is contained in:
ludo
2024-01-05 01:30:46 +01:00
parent d33dd6e755
commit 25b8fc40c5
128 changed files with 410 additions and 2580 deletions

View File

@@ -18,7 +18,7 @@ class Users
public static function isAdmin()
{
return (self::hasRole('admin')) ? true : false;
return self::hasRole('admin');
}
public static function getInfo($id = false)
@@ -42,7 +42,7 @@ class Users
if ($data['id'] ?? false) {
unset($data['password']);
}
$user = ($data['id'] ?? false) ? self::update($data) : self::create($data);
$user = $data['id'] ?? false ? self::update($data) : self::create($data);
$user->roles()->sync(array_keys($data['roles'] ?? []));
return $user;
@@ -243,9 +243,10 @@ class Users
$data = Upload::getData($file);
$file_uploaded = Upload::store($file, $targetDir);
$tab = pathinfo($file_uploaded);
$response['name'] = $tab['basename'];
return $response;
return [
'name' => $tab['basename'],
];
}
public static function update_avatar($id, $avatar)