@POST('^/api/v1/close_dispute')
    @authenticated
    def close_dispute(self, request):
        try:
            def cb(resp):
                if resp:
                    request.write(json.dumps({"success": True}, indent=4))
                    request.finish()
                else:
                    request.write(json.dumps({"success": False, "reason": resp}, indent=4))
                    request.finish()

            d = self.mserver.close_dispute(request.args["order_id"][0],
                                           request.args["resolution"][0].decode("utf8")
                                           if "resolution" in request.args else None,
                                           request.args["buyer_percentage"][0]
                                           if "buyer_percentage" in request.args else None,
                                           request.args["vendor_percentage"][0]
                                           if "vendor_percentage" in request.args else None,
                                           request.args["moderator_percentage"][0]
                                           if "moderator_percentage" in request.args else None,
                                           request.args["moderator_address"][0]
                                           if "moderator_address" in request.args else None)

            d.addCallback(cb)
            return server.NOT_DONE_YET
        except Exception, e:
            request.write(json.dumps({"success": False, "reason": e.message}, indent=4))
            request.finish()
            return server.NOT_DONE_YET
dataset/ETHPy150Open OpenBazaar/OpenBazaar-Server/api/restapi.py/OpenBazaarAPI.close_dispute/original