mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2025-09-18 21:38:07 +00:00
refactor: Simplify Statement (again)
This commit is contained in:
parent
3dadbdb854
commit
3ce8914673
1 changed files with 1 additions and 5 deletions
|
@ -740,11 +740,7 @@ export class RoleService implements OnApplicationShutdown, OnModuleInit {
|
|||
@bindThis
|
||||
public async clone(role: MiRole, moderator?: MiUser): Promise<MiRole> {
|
||||
const suffix = ' (cloned)';
|
||||
let newName = role.name;
|
||||
|
||||
newName = newName.slice(0, 256 - suffix.length);
|
||||
|
||||
newName += suffix;
|
||||
const newName = role.name.slice(0, 256 - suffix.length) + suffix;
|
||||
|
||||
return this.create({
|
||||
...role,
|
||||
|
|
Loading…
Add table
Reference in a new issue