mirror of
https://github.com/JuLi0n21/osu-progress-oauth-helper.git
synced 2026-04-19 16:00:06 +00:00
error handeling
This commit is contained in:
@@ -36,7 +36,7 @@ app.get('/refresh', (req, res) => {
|
||||
const refresh_token = req.body.refresh_token;
|
||||
const callbackport = req.query.port;
|
||||
|
||||
if(callbackport != null){
|
||||
if(callbackport != null && refresh_token != null){
|
||||
|
||||
try {
|
||||
const tokenEndpoint = 'https://osu.ppy.sh/oauth/token';
|
||||
@@ -68,7 +68,7 @@ app.get('/refresh', (req, res) => {
|
||||
}
|
||||
|
||||
} else {
|
||||
res.json({ error: "callback port needs to be defined"})
|
||||
res.json({ error: "callback port and refresh_token needs to be defined"})
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user