Turn on strict TS compilation. Fix up and tweak types accordingly.
This commit is contained in:
parent
690955a399
commit
629002b8d9
172 changed files with 720 additions and 534 deletions
|
@ -24,7 +24,7 @@ export const hasGuildPermission = async (userId: string, guildId: string, permis
|
|||
*/
|
||||
export function requireGuildPermission(permission: ApiPermissions) {
|
||||
return async (req: Request, res: Response, next) => {
|
||||
if (!(await hasGuildPermission(req.user.userId, req.params.guildId, permission))) {
|
||||
if (!(await hasGuildPermission(req.user!.userId, req.params.guildId, permission))) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue