mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Handle 404 fetch if the channel id doesnt exist
This commit is contained in:
parent
146b2311cf
commit
08a90c8a51
@ -333,6 +333,8 @@ def fetch():
|
|||||||
session['user_keys'].pop(guild_id, None)
|
session['user_keys'].pop(guild_id, None)
|
||||||
else:
|
else:
|
||||||
chan = filter_guild_channel(guild_id, channel_id)
|
chan = filter_guild_channel(guild_id, channel_id)
|
||||||
|
if not chan:
|
||||||
|
abort(404)
|
||||||
if not chan.get("read"):
|
if not chan.get("read"):
|
||||||
status_code = 401
|
status_code = 401
|
||||||
else:
|
else:
|
||||||
@ -352,6 +354,8 @@ def fetch_visitor():
|
|||||||
abort(403)
|
abort(403)
|
||||||
messages = {}
|
messages = {}
|
||||||
chan = filter_guild_channel(guild_id, channel_id, True)
|
chan = filter_guild_channel(guild_id, channel_id, True)
|
||||||
|
if not chan:
|
||||||
|
abort(404)
|
||||||
if not chan.get("read"):
|
if not chan.get("read"):
|
||||||
status_code = 401
|
status_code = 401
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user