mirror of https://gitlab.com/litecord/litecord.git
Merge branch 'patch-3' into 'master'
Channel names no longer end with a dash See merge request litecord/litecord!70
This commit is contained in:
commit
fc16231b9a
|
|
@ -191,6 +191,12 @@ def validate(
|
|||
if reqjson is None:
|
||||
raise BadRequest("No JSON provided")
|
||||
|
||||
try:
|
||||
if schema["type"]["type"] == "channel_type" and reqjson["name"][-1] == "-":
|
||||
reqjson["name"] = reqjson["name"][:-1]
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
valid = validator.validate(reqjson)
|
||||
except Exception:
|
||||
|
|
|
|||
Loading…
Reference in New Issue