refactor: introduce bindThis decorator to bind this automaticaly
This commit is contained in:
parent
e73581f715
commit
bbb49457f9
199 changed files with 969 additions and 96 deletions
|
|
@ -10,6 +10,7 @@ import { UserKeypair } from '@/models/entities/UserKeypair.js';
|
|||
import { UsedUsername } from '@/models/entities/UsedUsername.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import generateNativeUserToken from '@/misc/generate-native-user-token.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
|
||||
@Injectable()
|
||||
export class CreateSystemUserService {
|
||||
|
|
@ -21,6 +22,7 @@ export class CreateSystemUserService {
|
|||
) {
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async createSystemUser(username: string): Promise<User> {
|
||||
const password = uuid();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue