|
@@ -139,7 +139,11 @@
|
|
|
(equal "Bearer " (subseq (the string ,auth) 0 7)))
|
|
(equal "Bearer " (subseq (the string ,auth) 0 7)))
|
|
|
(subseq (the string ,auth) 7)))
|
|
(subseq (the string ,auth) 7)))
|
|
|
(,info (when ,bearer (gethash ,bearer (server-token-user *server*)))))
|
|
(,info (when ,bearer (gethash ,bearer (server-token-user *server*)))))
|
|
|
- (if ,info (progn ,@body) +401+))))
|
|
|
|
|
|
|
+ (when (and (not ,info)
|
|
|
|
|
+ (equal (getf myway:*env* :remote-addr) "127.0.0.1"))
|
|
|
|
|
+ (setf ,info `(:|username| "admin" :|id| 0 :|first_name| "cli" :|last_name| "admin"))
|
|
|
|
|
+ (if ,info (progn ,@body)
|
|
|
|
|
+ +401+)))))
|
|
|
|
|
|
|
|
(defun get-category-list (params)
|
|
(defun get-category-list (params)
|
|
|
(declare #.*standard-optimize-settings* (ignore params))
|
|
(declare #.*standard-optimize-settings* (ignore params))
|
|
@@ -231,7 +235,8 @@
|
|
|
(setf (getf stats :|duration|)
|
|
(setf (getf stats :|duration|)
|
|
|
(format-interval (getf stats :|duration|)))
|
|
(format-interval (getf stats :|duration|)))
|
|
|
(200-json (append stats
|
|
(200-json (append stats
|
|
|
- (list :|rescans| (subseq *rescans* 0 (min (length *rescans*) 10))))))))
|
|
|
|
|
|
|
+ (list :|rescans| (subseq (the list *rescans*)
|
|
|
|
|
+ 0 (min (length (the list *rescans*)) 10))))))))
|
|
|
|
|
|
|
|
(defvar *bot-token* nil "Login bot token")
|
|
(defvar *bot-token* nil "Login bot token")
|
|
|
(defun validate-user (info)
|
|
(defun validate-user (info)
|