Delete only selected answers in forms

This commit is contained in:
yflory 2022-12-08 17:20:31 +01:00
parent 600771682a
commit 97fde60e84
2 changed files with 2 additions and 1 deletions

View File

@ -227,6 +227,7 @@ define([
}).nThen;
var toDelete = [];
obj.forEach(function (answer) {
if (answer.uid !== data.uid) { return; }
n = n(function (waitFor) {
var hash = answer.hash;
var h = nacl.util.decodeUTF8(hash);

View File

@ -3050,7 +3050,7 @@ define([
var sframeChan = framework._.sfCommon.getSframeChannel();
sframeChan.query("Q_FORM_DELETE_ANSWER", {
channel: content.answers.channel,
hash: answers._hash
uid: uid
}, function (err, obj) {
if (obj && obj.error) {
console.error(obj.error);