mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-09-09 09:27:27 -05:00
style: remove unneeded catch parameter
This commit is contained in:
@@ -7,7 +7,7 @@ function isValidRedirect(redirect) {
|
||||
try {
|
||||
const url = new URL(redirect);
|
||||
return config.http.valid_redirection_domains.some(domain => url.hostname.endsWith(domain));
|
||||
} catch (ignored) {
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ router.get('/connect/discord', requireLoginMiddleware, async (request, response)
|
||||
scope: 'identify guilds',
|
||||
grantType: 'authorization_code'
|
||||
});
|
||||
} catch (ignored) {
|
||||
} catch {
|
||||
response.cookie('error_message', 'Invalid Discord authorization code. Please try again', { domain: '.pretendo.network' });
|
||||
return response.redirect('/account');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user