aboutsummaryrefslogtreecommitdiff
path: root/src/guff/api/methods.cr
diff options
context:
space:
mode:
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: /.*/,