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 refresh_token = req.body.refresh_token;
|
||||||
const callbackport = req.query.port;
|
const callbackport = req.query.port;
|
||||||
|
|
||||||
if(callbackport != null){
|
if(callbackport != null && refresh_token != null){
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const tokenEndpoint = 'https://osu.ppy.sh/oauth/token';
|
const tokenEndpoint = 'https://osu.ppy.sh/oauth/token';
|
||||||
@@ -68,7 +68,7 @@ app.get('/refresh', (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} 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