feat(server): add memories statistics resource (#19035)

This commit is contained in:
Jonathan Gilbert
2025-06-10 23:47:46 +10:00
committed by GitHub
parent 16745e77d4
commit e88bd74fd2
12 changed files with 352 additions and 17 deletions

View File

@@ -82,6 +82,10 @@ export class MemoryService extends BaseService {
return memories.map((memory) => mapMemory(memory, auth));
}
statistics(auth: AuthDto, dto: MemorySearchDto) {
return this.memoryRepository.statistics(auth.user.id, dto);
}
async get(auth: AuthDto, id: string): Promise<MemoryResponseDto> {
await this.requireAccess({ auth, permission: Permission.MEMORY_READ, ids: [id] });
const memory = await this.findOrFail(id);