Commit c24fdc18c3deb086c2ba4086840b4abf85b6376c
Allow publishing records not under .ssb
cel committed on 11/24/2016, 5:28:30 AMParent: ff8d8e85cff4c592274edcb6b2b9ba68e330e024
Files changed
lib/publish.js | changed |
lib/publish.js | ||
---|---|---|
@@ -18,14 +18,9 @@ | ||
18 | 18 … | var isValidClass = Publish.isValidClass = function (c) { |
19 | 19 … | return CLASSES.indexOf(c) !== -1; |
20 | 20 … | }; |
21 | 21 … | |
22 | -var endsInSSB = Publish.endsInSSB = function (s) { | |
23 | - return /(^|\.)ssb$/i.test(s); | |
24 | -}; | |
25 | - | |
26 | 22 … | var validateRecord = Publish.validateRecord = function (record) { |
27 | - if (!endsInSSB(record.name)) { return "[Record NameError] records must end in .ssb"; } | |
28 | 23 … | if (!isValidType(record.type)) { return "[Record TypeError] " + record.type + " is not a valid dns type"; } |
29 | 24 … | if (!isValidClass(record.class)) { return "[Record ClassError] class must be one of [" + CLASSES.join(', ') + "]"; } |
30 | 25 … | |
31 | 26 … | // TODO perform stricter validation on data |
Built with git-ssb-web