[questions][chore] update variable name

pull/330/head
hpkoh 3 years ago
parent cca2466edc
commit 257daa569c

@ -117,13 +117,13 @@ export const questionsQuestionCommentRouter = createProtectedRouter()
async resolve({ ctx, input }) {
const userId = ctx.session?.user?.id;
const questionCommentToUpdate = await ctx.prisma.questionsQuestionComment.findUnique({
const questionCommentToDelete = await ctx.prisma.questionsQuestionComment.findUnique({
where: {
id: input.id,
},
});
if (questionCommentToUpdate?.id !== userId) {
if (questionCommentToDelete?.id !== userId) {
throw new TRPCError({
code: 'UNAUTHORIZED',
message: 'User have no authorization to record.',

Loading…
Cancel
Save