AnsweredAssumed Answered

How to use the existing comment web scripts  to post?

Question asked by nancygaillard on Oct 2, 2015
Latest reply on Oct 16, 2015 by nancygaillard

I have a problem to understand how to use especially the POST Web script (because of the use of comment.lib.js)
I need to understand how it works to implement a Aikau service which allows users to add comments everithings from a dialog form.

I am inspired by

In comparison with the POST web script of groups :
1 - github) url : /api/rootgroups/{shortName}
1 - me) url : /api/node/{store_type}/{store_id}/{id}/comments (I have not seen an other comment webscript to POST a comment)

2 - github) in the model we can see
displayName = json.get("displayName")
and = groups.createRootGroup(shortName, displayName);

2 - me) the model send us to comment.lib.js , so I gone on C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\templates\webscripts\org\alfresco\repository\comments\comment.lib.ftl, but I seen nothing about adding or updating comments!!!

3 - github) in the custom service we have to write something like :
    url: AlfConstants.PROXY_URI + "api/rootgroups/" + payload.shortName,
    method: "POST",
    data: {
      displayName: payload.displayName
3 - me) i am not here ><

Thank you for future help!