Compare commits

...

6 Commits

Author SHA1 Message Date
Mai 9202ddc3f7 Merge branch 'patch-3' into 'master'
Channel names no longer end with a dash

See merge request litecord/litecord!70
2022-03-18 11:18:35 +00:00
luna 5f97103e1c Merge branch 'master' into 'master'
Fixed typo in README

See merge request litecord/litecord!88
2022-03-14 22:15:40 +00:00
Basil e9f762366e Fixed typo in README 2022-03-14 21:50:33 +00:00
Mai 549d5992fd Finally got things to work 2020-09-12 05:07:51 +00:00
Mai fbc15219f7 I am terrible at python jfc 2020-09-10 20:28:39 +00:00
Mai e9edd8ba37 Channel names are not supposed to end with a dash, pretty ghetto way of doing it but I'm tired af 2020-09-10 20:20:27 +00:00
2 changed files with 7 additions and 1 deletions

View File

@ -53,7 +53,7 @@ are not implemented, for example:
- Threads
- Channel Categories
- API v9 (Right now, Litecord, in generla, assumes v9 is
- API v9 (Right now, Litecord, in general, assumes v9 is
just v6 to make clients work, new payload structure support is
scattered throughout the codebase)

View File

@ -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: