Commit 801ffeb6 authored by Romain Courteaud's avatar Romain Courteaud

slapos_json_rpc_api: hack the API to return a dict instead of json...

parent 948f9ea4
......@@ -25,13 +25,11 @@
#
##############################################################################
from App.Common import rfc1123_date
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from erp5.component.module.SlapOSCloud import _assertACI
import json
class SoftwareInstanceJsonTypeMixin:
......@@ -146,13 +144,7 @@ class SoftwareInstanceJsonTypeMixin:
if revision:
result["api_revision"] = revision
self.REQUEST.response.setHeader('Cache-Control',
'private, max-age=0, must-revalidate')
self.REQUEST.response.setHeader('Vary',
'REMOTE_USER')
self.REQUEST.response.setHeader('Last-Modified',
rfc1123_date(self.getModificationDate()))
return json.dumps(result, indent=2)
return result
security.declareProtected(Permissions.ModifyPortalContent, 'fromJSONText')
def fromJSONText(self, json_content):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment