[FIX] runbot: allow webhooks to work

This commit is contained in:
Christophe Monniez 2018-03-12 15:39:44 +01:00
parent 21c31b4c3c
commit bd715451a9

View File

@ -8,7 +8,7 @@ from odoo.http import request
class RunbotHook(http.Controller):
@http.route(['/runbot/hook/<int:repo_id>'], type='http', auth="public", website=True)
@http.route(['/runbot/hook/<int:repo_id>'], type='http', auth="public", website=True, csrf=False)
def hook(self, repo_id=None, **post):
# TODO if repo_id == None parse the json['repository']['ssh_url'] and find the right repo
repo = request.env['runbot.repo'].sudo().browse([repo_id])