mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 15:35:12 +00:00
remove un-necessary assignment to query
This commit is contained in:
parent
9d3292e6e9
commit
56e7d7e0b1
1 changed files with 3 additions and 4 deletions
|
@ -52,7 +52,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
private queryService: QueryService,
|
private queryService: QueryService,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
let query = this.notesRepository
|
const query = this.notesRepository
|
||||||
.createQueryBuilder('note')
|
.createQueryBuilder('note')
|
||||||
.setParameter('me', me.id)
|
.setParameter('me', me.id)
|
||||||
|
|
||||||
|
@ -73,8 +73,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
// Limit to mutuals, if requested
|
// Limit to mutuals, if requested
|
||||||
if (ps.mutualsOnly) {
|
if (ps.mutualsOnly) {
|
||||||
query = query
|
query.innerJoin(MiFollowing, 'mutuals', 'latest.user_id = mutuals."followerId" AND mutuals."followeeId" = :me');
|
||||||
.innerJoin(MiFollowing, 'mutuals', 'latest.user_id = mutuals."followerId" AND mutuals."followeeId" = :me');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Respect blocks and mutes
|
// Respect blocks and mutes
|
||||||
|
@ -82,7 +81,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
this.queryService.generateMutedUserQuery(query, me);
|
this.queryService.generateMutedUserQuery(query, me);
|
||||||
|
|
||||||
// Support pagination
|
// Support pagination
|
||||||
query = this.queryService
|
this.queryService
|
||||||
.makePaginationQuery(query, ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
|
.makePaginationQuery(query, ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
|
||||||
.orderBy('note.id', 'DESC')
|
.orderBy('note.id', 'DESC')
|
||||||
.take(ps.limit);
|
.take(ps.limit);
|
||||||
|
|
Loading…
Reference in a new issue