mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-06-16 18:39:28 +08:00
1 line
1.3 KiB
Plaintext
1 line
1.3 KiB
Plaintext
{"a8dade7a40ede984":{"properties":{"visited":{"required":false,"type":"date","typeLabel":"date","id":"visited"},"name":{"required":false,"type":"string","typeLabel":"string","id":"name"}},"onGet":"","onPost":"/* Authentication */\n// if (!me || !me.isAdmin) {\n// cancel(\"You must be an admin!\", 401);\n// }\n\n/* Automatic properties */\n// this.creator = me.id;\n// this.creatorName = me.name;\n","onPut":"var visited = new Date(this.visited);\nvar now = new Date().getTime();\n\nif(now - visited < 5000) {\n emit('visit', me.name);\n}","onDelete":"","onValidate":"/* Validation */\n// if (this.name.length < 10) {\n// error(\"name\", \"Must be at least 10 characters\");\n// }\n","path":"/users","order":1,"typeLabel":"Users Collection","type":"UserCollection","$renameFrom":"/users"},"6f27a290f2f4f840":{"properties":{"text":{"required":false,"type":"string","typeLabel":"string","id":"text"}},"onGet":"","onPost":"this.creator = me.name;\nemit('messages changed', this);","onPut":"emit('messages changed', this);","onDelete":"emit('messages changed', this);","onValidate":"/* Validation */\n// if (this.name.length < 10) {\n// error(\"name\", \"Must be at least 10 characters\");\n// }\n","path":"/messages","order":2,"typeLabel":"Collection","type":"Collection"}} |