From b417241ca033a1c2a0b2c03ef726e78b37087194 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 7 Oct 2022 12:05:11 -0400 Subject: [PATCH] make permission reason not optional --- src/utils/permissions.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/permissions.ts b/src/utils/permissions.ts index 716a258..b981883 100644 --- a/src/utils/permissions.ts +++ b/src/utils/permissions.ts @@ -9,7 +9,7 @@ import { getReputation } from "./reputation"; interface CanSubmitResult { canSubmit: boolean; - reason?: string; + reason: string; } async function lowDownvotes(userID: HashedUserID): Promise { @@ -32,7 +32,8 @@ export async function canSubmit(userID: HashedUserID, category: Category): Promi }; default: return { - canSubmit: true + canSubmit: true, + reason: "" }; } } \ No newline at end of file