mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-04-25 08:01:53 -05:00
style: remove unneeded catch parameter
This commit is contained in:
parent
0e77df6fdd
commit
880b9174a1
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user