mirror of
https://github.com/flarum/framework.git
synced 2025-03-03 11:39:54 +08:00
Fix API key generation
This commit is contained in:
parent
f52d5f2ccf
commit
bcd74ff09b
@ -31,8 +31,10 @@ class ApiKey extends AbstractModel
|
|||||||
*/
|
*/
|
||||||
public static function generate()
|
public static function generate()
|
||||||
{
|
{
|
||||||
return new static([
|
$key = new static;
|
||||||
'id' => str_random(40)
|
|
||||||
]);
|
$key->key = str_random(40);
|
||||||
|
|
||||||
|
return $key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user