Skip to content

Commit

Permalink
fix: pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelchris committed Jan 29, 2025
1 parent 2ddf4fc commit 26c8a52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/schema/posts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2345,9 +2345,8 @@ export const resolvers: IResolvers<unknown, BaseContext> = traceResolvers<
ctx: AuthContext,
info,
): Promise<GQLPost> => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [post, __, ___] = await Promise.all([
ctx.con.getRepository(Post).findOneByOrFail({ id }),
const [post] = await Promise.all([
ctx.con.getRepository(Post).findOneOrFail({ where: { id } }),
ensureSourcePermissions(ctx, sourceId, SourcePermissions.Post),
ensurePostRateLimit(ctx.con, ctx.userId),
]);
Expand Down

0 comments on commit 26c8a52

Please sign in to comment.