Implement editing

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-01-31 11:38:57 +01:00
parent 03d5321414
commit 6286779041
4 changed files with 62 additions and 95 deletions

View File

@@ -44,6 +44,29 @@ export class CommentApi {
return xmlToTagList(response.data)
}
async fetchComment({ cardId, commentId }) {
const response = await axios({
method: 'PROPFIND',
url: this.url(`${cardId}/${commentId}`),
data: `<?xml version="1.0"?>
<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
<d:prop>
<oc:id />
<oc:message />
<oc:actorType />
<oc:actorId />
<oc:actorDisplayName />
<oc:creationDateTime />
<oc:objectType />
<oc:objectId />
<oc:isUnread />
<oc:mentions />
</d:prop>
</d:propfind>`,
})
return xmlToTagList(response.data)
}
async createComment({ cardId, comment }) {
const response = await axios({
method: 'POST',