getUserUriをUserEntityServiceに
This commit is contained in:
parent
70d34aa05c
commit
5115ff1466
16 changed files with 107 additions and 84 deletions
|
|
@ -10,6 +10,7 @@ import { QueueLoggerService } from '../QueueLoggerService.js';
|
|||
import { RelationshipJobData } from '../types.js';
|
||||
import type { UsersRepository } from '@/models/index.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { LocalUser, RemoteUser } from '@/models/entities/User.js';
|
||||
|
||||
@Injectable()
|
||||
export class RelationshipProcessorService {
|
||||
|
|
@ -39,7 +40,7 @@ export class RelationshipProcessorService {
|
|||
const [follower, followee] = await Promise.all([
|
||||
this.usersRepository.findOneByOrFail({ id: job.data.from.id }),
|
||||
this.usersRepository.findOneByOrFail({ id: job.data.to.id }),
|
||||
]);
|
||||
]) as [LocalUser | RemoteUser, LocalUser | RemoteUser];
|
||||
await this.userFollowingService.unfollow(follower, followee, job.data.silent);
|
||||
return 'ok';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue