aboutsummaryrefslogtreecommitdiff
path: root/src/guff/api/methods.cr
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-04-01 15:58:08 -0400
committerPaul Duncan <pabs@pablotron.org>2016-04-01 15:58:08 -0400
commit6b9ca27c67d043a8737da652bf7915645628db4c (patch)
tree928ead16b4d04a695de6642c9dc818edab74b0d3 /src/guff/api/methods.cr
parent974d7c1d8ae71d50566dc8c2857520dde139a191 (diff)
downloadold-guff-6b9ca27c67d043a8737da652bf7915645628db4c.tar.bz2
old-guff-6b9ca27c67d043a8737da652bf7915645628db4c.zip
add_user test
Diffstat (limited to 'src/guff/api/methods.cr')
-rw-r--r--src/guff/api/methods.cr37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/guff/api/methods.cr b/src/guff/api/methods.cr
index 8df48d5..970e41f 100644
--- a/src/guff/api/methods.cr
+++ b/src/guff/api/methods.cr
@@ -366,6 +366,42 @@ module Guff
},
},
},
+
+ "add_user": {
+ text: "Add new user",
+
+ args: {
+ "name": {
+ text: "Name of user",
+ type: :text,
+ required: true,
+ },
+
+ "active": {
+ text: "Is this user active?",
+ type: :bool,
+ required: false,
+ },
+
+ "role": {
+ text: "Role of user",
+ type: :text,
+ required: false,
+ },
+
+ "email": {
+ text: "Email address of user",
+ type: :text,
+ required: false,
+ },
+
+ "password": {
+ text: "Password of user",
+ type: :text,
+ required: false,
+ },
+ },
+ },
}
}
@@ -375,6 +411,7 @@ module Guff
int: /^\d+$/,
int_list: /^\d+(?:,\d+)*$/,
state: /^(?:draft|posted|deleted)$/,
+ bool: /^t|f$/,
# FIXME: lock these down more
json: /.*/,