Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
265
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
24
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TransFem.org
Sharkey
Commits
03559156
Commit
03559156
authored
3 weeks ago
by
Caramel
Browse files
Options
Downloads
Patches
Plain Diff
Improve performance of notes/following API
parent
6ed38f53
No related branches found
No related tags found
2 merge requests
!760
Coordinated Security Release
,
!743
Improve performance of notes/following API
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/backend/src/server/api/endpoints/notes/following.ts
+9
-9
9 additions, 9 deletions
packages/backend/src/server/api/endpoints/notes/following.ts
with
9 additions
and
9 deletions
packages/backend/src/server/api/endpoints/notes/following.ts
+
9
−
9
View file @
03559156
...
...
@@ -103,6 +103,15 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
sub
.
andWhere
(
'
latest.is_quote = false
'
);
}
// Select the appropriate collection of users
if
(
ps
.
list
===
'
followers
'
)
{
addFollower
(
sub
);
}
else
if
(
ps
.
list
===
'
following
'
)
{
addFollowee
(
sub
);
}
else
{
addMutual
(
sub
);
}
return
sub
;
},
'
latest
'
,
...
...
@@ -118,15 +127,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.
leftJoinAndSelect
(
'
note.channel
'
,
'
channel
'
)
;
// Select the appropriate collection of users
if
(
ps
.
list
===
'
followers
'
)
{
addFollower
(
query
);
}
else
if
(
ps
.
list
===
'
following
'
)
{
addFollowee
(
query
);
}
else
{
addMutual
(
query
);
}
// Limit to files, if requested
if
(
ps
.
filesOnly
)
{
query
.
andWhere
(
'
note."fileIds" !=
\'
{}
\'
'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment