summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb/files
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2015-10-01 14:29:58 +0200
committervarac <varacanero@zeromail.org>2015-10-01 14:29:58 +0200
commit03528deb5aab7311a90b07aec77e0805a233d154 (patch)
tree7c25e2fa79d09e01b4e2fb43956517d541f789da /puppet/modules/site_couchdb/files
parent5cc27111151083d0a8e5098505a0024c2d2ea201 (diff)
parent3224a73ec6b2f06cf4c43f86d5b7673e442043dd (diff)
Merge remote-tracking branch 'alster-hamburgers/invite_codes' into develop
Diffstat (limited to 'puppet/modules/site_couchdb/files')
-rw-r--r--puppet/modules/site_couchdb/files/designs/invite_codes/InviteCode.json22
1 files changed, 22 insertions, 0 deletions
diff --git a/puppet/modules/site_couchdb/files/designs/invite_codes/InviteCode.json b/puppet/modules/site_couchdb/files/designs/invite_codes/InviteCode.json
new file mode 100644
index 00000000..006c1ea1
--- /dev/null
+++ b/puppet/modules/site_couchdb/files/designs/invite_codes/InviteCode.json
@@ -0,0 +1,22 @@
+{
+ "_id": "_design/InviteCode",
+ "language": "javascript",
+ "views": {
+ "by__id": {
+ "map": " function(doc) {\n if ((doc['type'] == 'InviteCode') && (doc['_id'] != null)) {\n emit(doc['_id'], 1);\n }\n }\n",
+ "reduce": "_sum"
+ },
+ "by_invite_code": {
+ "map": " function(doc) {\n if ((doc['type'] == 'InviteCode') && (doc['invite_code'] != null)) {\n emit(doc['invite_code'], 1);\n }\n }\n",
+ "reduce": "_sum"
+ },
+ "by_invite_count": {
+ "map": " function(doc) {\n if ((doc['type'] == 'InviteCode') && (doc['invite_count'] != null)) {\n emit(doc['invite_count'], 1);\n }\n }\n",
+ "reduce": "_sum"
+ },
+ "all": {
+ "map": " function(doc) {\n if (doc['type'] == 'InviteCode') {\n emit(doc._id, null);\n }\n }\n"
+ }
+ },
+ "couchrest-hash": "83fb8f504520b4a9c7ddbb7928cd0ce3"
+} \ No newline at end of file