mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 04:32:35 +01:00
use connection revoked error
This commit is contained in:
parent
6d6944cfee
commit
7e10d73dac
@ -58,8 +58,7 @@ router.get("/", route({}), async (req: Request, res: Response) => {
|
||||
],
|
||||
});
|
||||
if (!connectedAccount) throw DiscordApiErrors.UNKNOWN_CONNECTION;
|
||||
if (connectedAccount.revoked)
|
||||
throw new ApiError("Connection revoked", 0, 400);
|
||||
if (connectedAccount.revoked) throw DiscordApiErrors.CONNECTION_REVOKED;
|
||||
if (!connectedAccount.token_data)
|
||||
throw new ApiError("No token data", 0, 400);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user