mirror of https://gitlab.com/litecord/litecord.git
send 201 on channel create to make client happy
This commit is contained in:
parent
a1ca74f960
commit
25d6c635a3
|
|
@ -62,7 +62,7 @@ async def create_channel(guild_id):
|
||||||
chan = await app.storage.get_channel(new_channel_id)
|
chan = await app.storage.get_channel(new_channel_id)
|
||||||
await app.dispatcher.guild.dispatch(guild_id, ("CHANNEL_CREATE", chan))
|
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):
|
async def _chan_update_dispatch(guild_id: int, channel_id: int):
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ async def test_channel_create(test_cli_user):
|
||||||
"name": "hello-world",
|
"name": "hello-world",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
assert resp.status_code == 200
|
assert resp.status_code == 201
|
||||||
rjson = await resp.json
|
rjson = await resp.json
|
||||||
channel_id: str = rjson["id"]
|
channel_id: str = rjson["id"]
|
||||||
assert rjson["name"] == "hello-world"
|
assert rjson["name"] == "hello-world"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue