mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-09 16:53:11 +08:00
Added logic to persist device long URLs while creating/editing a short URL
This commit is contained in:
@@ -147,12 +147,9 @@ class ApiKey extends AbstractEntity
|
||||
$meta = $roleDefinition->meta;
|
||||
|
||||
if ($this->hasRole($role)) {
|
||||
/** @var ApiKeyRole $apiKeyRole */
|
||||
$apiKeyRole = $this->roles->get($role->value);
|
||||
$apiKeyRole->updateMeta($meta);
|
||||
$this->roles->get($role->value)?->updateMeta($meta);
|
||||
} else {
|
||||
$apiKeyRole = new ApiKeyRole($roleDefinition->role, $roleDefinition->meta, $this);
|
||||
$this->roles[$role->value] = $apiKeyRole;
|
||||
$this->roles->set($role->value, new ApiKeyRole($role, $meta, $this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user