mirror of https://gitlab.com/litecord/litecord.git
invites: return 404 on unknown inv
This commit is contained in:
parent
48a65325f4
commit
c33be64b79
|
|
@ -51,6 +51,9 @@ async def create_invite(channel_id):
|
||||||
async def get_invite(invite_code: str):
|
async def get_invite(invite_code: str):
|
||||||
inv = await app.storage.get_invite(invite_code)
|
inv = await app.storage.get_invite(invite_code)
|
||||||
|
|
||||||
|
if not inv:
|
||||||
|
return '', 404
|
||||||
|
|
||||||
if request.args.get('with_counts'):
|
if request.args.get('with_counts'):
|
||||||
extra = await app.storage.get_invite_extra(invite_code)
|
extra = await app.storage.get_invite_extra(invite_code)
|
||||||
inv.update(extra)
|
inv.update(extra)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue