mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-12 20:40:46 +01: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,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
let query = this.notesRepository
|
||||
const query = this.notesRepository
|
||||
.createQueryBuilder('note')
|
||||
.setParameter('me', me.id)
|
||||
|
||||
|
@ -73,8 +73,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
|
||||
// Limit to mutuals, if requested
|
||||
if (ps.mutualsOnly) {
|
||||
query = query
|
||||
.innerJoin(MiFollowing, 'mutuals', 'latest.user_id = mutuals."followerId" AND mutuals."followeeId" = :me');
|
||||
query.innerJoin(MiFollowing, 'mutuals', 'latest.user_id = mutuals."followerId" AND mutuals."followeeId" = :me');
|
||||
}
|
||||
|
||||
// Respect blocks and mutes
|
||||
|
@ -82,7 +81,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
this.queryService.generateMutedUserQuery(query, me);
|
||||
|
||||
// Support pagination
|
||||
query = this.queryService
|
||||
this.queryService
|
||||
.makePaginationQuery(query, ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
|
||||
.orderBy('note.id', 'DESC')
|
||||
.take(ps.limit);
|
||||
|
|
Loading…
Reference in a new issue