wiki: Add uri variants for alloweditor.

This commit is contained in:
Andre D
2013-05-21 03:53:37 -07:00
committed by Neil Williams
parent 32b7464a37
commit eacba0fc39

View File

@@ -356,7 +356,8 @@ class WikiApiController(WikiController):
page=VWikiPage('page'),
act=VOneOf('act', ('del', 'add')),
user=VExistingUname('username'))
@api_doc(api_section.wiki, uri='/api/wiki/alloweditor/{act}')
@api_doc(api_section.wiki, uri='/api/wiki/alloweditor/{act}',
uri_variants=['/api/wiki/alloweditor/%s' % act for act in ('del', 'add')])
def POST_wiki_allow_editor(self, act, page, user):
if not user:
self.handle_error(404, 'UNKNOWN_USER')