perf: migrate listHandler to AttributeRepository + cache attributes fetching in RSCs (#21552)

* refactor: migrate listHandler to AttributeRepository

Co-Authored-By: [email protected] <[email protected]>

* cache attributes list

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: [email protected] <[email protected]>
Co-authored-by: hbjORbj <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-05-29 15:01:44 -04:00
1 parent c3add4bae8
commit e115095198
7 files changed
+39 -41

No files matched your search

@@ -42,4 +42,15 @@ export class AttributeRepository {
return result;
}
static async findAllByOrgIdWithOptions({ orgId }: { orgId: number }) {
return await prisma.attribute.findMany({
where: {
teamId: orgId,
},
include: {
options: true,
},
});
}
}