Mercurial > psgxs
comparison modules/mod_publish.js @ 58:b98e545a94f7 default tip
Always use children instead of tags. Might break something.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 13 Sep 2011 00:54:55 +0200 |
parents | 99bd1d1ac071 |
children |
comparison
equal
deleted
inserted
replaced
57:addbf6bbfaa8 | 58:b98e545a94f7 |
---|---|
51 var itemID = item.getAttribute('id'); | 51 var itemID = item.getAttribute('id'); |
52 if (!config.enabled('item-ids') && itemID) | 52 if (!config.enabled('item-ids') && itemID) |
53 return makeError(response, errors.itemid_required.n); | 53 return makeError(response, errors.itemid_required.n); |
54 itemID = itemID? itemID: uuid(); | 54 itemID = itemID? itemID: uuid(); |
55 | 55 |
56 if (item.tags.length != 1) | 56 if (item.children.length != 1) |
57 return makeError(response, errors.pub.publish.bad_payload.n); | 57 return makeError(response, errors.pub.publish.bad_payload.n); |
58 | 58 |
59 var conf = storage.getConfiguration(nodeID); | 59 var conf = storage.getConfiguration(nodeID); |
60 /*var publishOptions = pubsub.getChild('publish-options'); | 60 /*var publishOptions = pubsub.getChild('publish-options'); |
61 if (publishOptions && config.enabled('publish-options')) { | 61 if (publishOptions && config.enabled('publish-options')) { |