send 201 on channel create to make client happy

This commit is contained in:
NotNite 2021-09-21 20:06:49 -04:00
parent a1ca74f960
commit 25d6c635a3
No known key found for this signature in database
GPG Key ID: BD91A5402CCEB08A
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ async def create_channel(guild_id):
chan = await app.storage.get_channel(new_channel_id)
await app.dispatcher.guild.dispatch(guild_id, ("CHANNEL_CREATE", chan))
return jsonify(chan)
return jsonify(chan), 201
async def _chan_update_dispatch(guild_id: int, channel_id: int):

View File

@ -33,7 +33,7 @@ async def test_channel_create(test_cli_user):
"name": "hello-world",
},
)
assert resp.status_code == 200
assert resp.status_code == 201
rjson = await resp.json
channel_id: str = rjson["id"]
assert rjson["name"] == "hello-world"