perf: Remove unneccessary join from documents.viewed
This commit is contained in:
@@ -101,7 +101,6 @@ export default function auth(
|
||||
|
||||
if (tracer) {
|
||||
const span = tracer.scope().active();
|
||||
console.log(span);
|
||||
if (span !== null) {
|
||||
span.setTag("request.userId", user.id);
|
||||
span.setTag("request.teamId", user.teamId);
|
||||
|
||||
@@ -283,15 +283,6 @@ router.post("documents.viewed", auth(), pagination(), async (ctx) => {
|
||||
collectionId: collectionIds,
|
||||
},
|
||||
include: [
|
||||
{
|
||||
model: Star,
|
||||
as: "starred",
|
||||
where: {
|
||||
userId,
|
||||
},
|
||||
separate: true,
|
||||
required: false,
|
||||
},
|
||||
{
|
||||
model: Collection.scope({
|
||||
method: ["withMembership", userId],
|
||||
|
||||
Reference in New Issue
Block a user