sparkbooth anbindung gefixt
This commit is contained in:
@@ -26,6 +26,9 @@ class Gallery extends Model
|
||||
'upload_enabled',
|
||||
'upload_token_hash',
|
||||
'upload_token_expires_at',
|
||||
'sparkbooth_username',
|
||||
'sparkbooth_password',
|
||||
'sparkbooth_response_format',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
@@ -39,6 +42,8 @@ class Gallery extends Model
|
||||
'access_duration_minutes' => 'int',
|
||||
'upload_enabled' => 'bool',
|
||||
'upload_token_expires_at' => 'datetime',
|
||||
'sparkbooth_password' => 'encrypted',
|
||||
'sparkbooth_response_format' => 'string',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -60,4 +65,13 @@ class Gallery extends Model
|
||||
|
||||
return $token;
|
||||
}
|
||||
|
||||
public function regenerateSparkboothPassword(): string
|
||||
{
|
||||
$password = \Illuminate\Support\Str::random(24);
|
||||
$this->sparkbooth_password = $password;
|
||||
$this->save();
|
||||
|
||||
return $password;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user