lint and type fixes
This commit is contained in:
parent
54071efaea
commit
6ac37b4d6c
84 changed files with 188 additions and 374 deletions
|
|
@ -139,6 +139,24 @@ export class ApLogService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all logged inbox activities from a user or users
|
||||
* @param userIds IDs of the users to delete
|
||||
*/
|
||||
public async deleteInboxLogs(userIds: string | string[]): Promise<number> {
|
||||
if (Array.isArray(userIds)) {
|
||||
const logsDeleted = await this.apInboxLogsRepository.delete({
|
||||
authUserId: In(userIds),
|
||||
});
|
||||
return logsDeleted.affected ?? 0;
|
||||
} else {
|
||||
const logsDeleted = await this.apInboxLogsRepository.delete({
|
||||
authUserId: userIds,
|
||||
});
|
||||
return logsDeleted.affected ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all expired AP logs and garbage-collects the AP context cache.
|
||||
* Returns the total number of deleted rows.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue