Skip to content

Commit 886b5bf

Browse files
committed
'verify' function: check arguments type
1 parent 2fe89f5 commit 886b5bf

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

recaptcha-enterprise.asd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(defsystem recaptcha-enterprise
2-
:version "0.1.2"
2+
:version "0.1.3"
33
:author "Dmitrii Kosenkov"
44
:license "MIT"
55
:depends-on ("dexador" "jonathan")

recaptcha-enterprise.lisp

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
"your Google Cloud project ID")
77

88
(defun verify (key-id token &optional (action "LOGIN"))
9-
(assert (not (null *api-key*)))
10-
(assert (not (null *project-id*)))
9+
(check-type *api-key* string)
10+
(check-type *project-id* string)
11+
(check-type token string)
12+
(check-type key-id string)
13+
(check-type action string)
1114
(let* ((response (dex:post (format nil "https://recaptchaenterprise.googleapis.com/v1/projects/~A/assessments?key=~A"
1215
*project-id* *api-key*)
1316
:headers '(("Content-Type" . "application/json"))

0 commit comments

Comments
 (0)