run: replace member/banned/target to user in api_index

This commit is contained in:
Luna Mendes 2018-11-20 14:48:44 -03:00
parent 52c2fdb771
commit 437f8de643
1 changed files with 5 additions and 0 deletions

5
run.py
View File

@ -231,6 +231,11 @@ async def api_index(app):
path = path.replace('>', '}')
path = path.replace('int:', '')
# change our parameters into user.id
path = path.replace('member.id', 'user.id')
path = path.replace('banned.id', 'user.id')
path = path.replace('target.id', 'user.id')
methods = rule.methods
for method in methods: