Fix templates in poll part 2 #375
This commit is contained in:
@@ -477,6 +477,9 @@ define([
|
|||||||
// PPP: password for the new template?
|
// PPP: password for the new template?
|
||||||
var hash = Hash.createRandomHash(p.type);
|
var hash = Hash.createRandomHash(p.type);
|
||||||
var href = '/' + p.type + '/#' + hash;
|
var href = '/' + p.type + '/#' + hash;
|
||||||
|
|
||||||
|
var optsPut = {};
|
||||||
|
if (p.type === 'poll') { optsPut.initialState = '{}'; }
|
||||||
// PPP: add password as cryptput option
|
// PPP: add password as cryptput option
|
||||||
Cryptput(hash, data.toSave, function (e) {
|
Cryptput(hash, data.toSave, function (e) {
|
||||||
if (e) { throw new Error(e); }
|
if (e) { throw new Error(e); }
|
||||||
@@ -488,7 +491,7 @@ define([
|
|||||||
if (obj && obj.error) { return void cb(obj.error); }
|
if (obj && obj.error) { return void cb(obj.error); }
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
});
|
}, optsPut);
|
||||||
};
|
};
|
||||||
|
|
||||||
common.isTemplate = function (href, cb) {
|
common.isTemplate = function (href, cb) {
|
||||||
|
|||||||
Reference in New Issue
Block a user