Skip to content

Commit b417241

Browse files
committed
make permission reason not optional
1 parent ee3d94e commit b417241

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/utils/permissions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { getReputation } from "./reputation";
99

1010
interface CanSubmitResult {
1111
canSubmit: boolean;
12-
reason?: string;
12+
reason: string;
1313
}
1414

1515
async function lowDownvotes(userID: HashedUserID): Promise<boolean> {
@@ -32,7 +32,8 @@ export async function canSubmit(userID: HashedUserID, category: Category): Promi
3232
};
3333
default:
3434
return {
35-
canSubmit: true
35+
canSubmit: true,
36+
reason: ""
3637
};
3738
}
3839
}

0 commit comments

Comments
 (0)