Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
gabboman committed Feb 1, 2025
1 parent df0f10d commit 0f11fe1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/backend/routes/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Application, Response } from 'express'
import { authenticateToken } from '../utils/authenticateToken.js'
import optionalAuthentication from '../utils/optionalAuthentication.js'
import AuthorizedRequest from '../interfaces/authorizedRequest.js'
import { Post, PostMentionsUserRelation } from '../db.js'
import { Post, PostMentionsUserRelation, sequelize } from '../db.js'
import { Op } from 'sequelize'
import getStartScrollParam from '../utils/getStartScrollParam.js'
import { environment } from '../environment.js'
Expand Down Expand Up @@ -122,6 +122,16 @@ export default function dashboardRoutes(app: Application) {
}
}
}
//TODO delete this ALTERNATIVE DASHBOARD QUERY
case 50: {
whereObject = {
privacy: { [Op.in]: [0, 1, 2, 3] },
literal: sequelize.literal(
`"userid" = '${posterId}' OR "userId" IN (SELECT "followedId" FROM "follows" WHERE "followerId"='${posterId}' ) `
)
}
break
}
}
// we get the list of posts
const postIds = await Post.findAll({
Expand Down

0 comments on commit 0f11fe1

Please sign in to comment.