From 46580322fca36ca25a0a199245566a813d348b87 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 11 Apr 2025 02:44:19 -0400 Subject: [PATCH] Fix dearrow old submitter check --- src/utils/permissions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/permissions.ts b/src/utils/permissions.ts index 81de723..9e55026 100644 --- a/src/utils/permissions.ts +++ b/src/utils/permissions.ts @@ -1,5 +1,5 @@ import { config } from "../config"; -import { db } from "../databases/databases"; +import { db, privateDB } from "../databases/databases"; import { Category } from "../types/segments.model"; import { Feature, HashedUserID } from "../types/user.model"; import { hasFeature } from "./features"; @@ -59,7 +59,7 @@ async function oldDeArrowSubmitterOrAllowed(userID: HashedUserID): Promise= 1; if (!isOldSubmitter) { if (!submitterThreshold) { - const voteResult = await db.prepare("get", `SELECT "UUID" from "titleVotes" where "userID" = ?`, [userID], { useReplica: true }); + const voteResult = await privateDB.prepare("get", `SELECT "UUID" from "titleVotes" where "userID" = ?`, [userID], { useReplica: true }); if (voteResult?.UUID) { // Count at least one vote as an old submitter as well return true;