comments
This commit is contained in:
parent
9518557516
commit
9a5c473e15
@ -13,7 +13,7 @@ class API extends Application
|
||||
|
||||
@before_filter( capture_errors_json json_params =>
|
||||
-- TODO implement Authorization: api_key VALUE as acceptable method to send api_key
|
||||
yield_error "api_key not specified!" unless @params.api_key
|
||||
yield_error "api_key not specified!" unless @params.api_key -- this does not seem to be triggering!!!
|
||||
@api_key = APIKeys\find key: @params.api_key
|
||||
yield_error "Invalid api_key" unless @api_key
|
||||
@user = Users\find id: @api_key.user_id
|
||||
@ -119,7 +119,7 @@ class API extends Application
|
||||
}
|
||||
@params.count or= 50
|
||||
@params.page or= 1
|
||||
@params.order or= "asc" -- may need to be "desc", don't remember o.o
|
||||
@params.order or= "asc"
|
||||
yield_error "Invalid page. (Must be a positive integer.)" if @params.page < 1
|
||||
|
||||
local Paginator
|
||||
@ -143,5 +143,3 @@ class API extends Application
|
||||
-- /random { count: #, done: bool } (both args optional, defaults count 1, done false)
|
||||
-- /list { count: #, done: bool, page: #, order: asc/desc } (if done not specified, returns all,
|
||||
-- default count is 50, default page is 1, default order is latest first
|
||||
--
|
||||
-- Add ability to send out subscription webhooks.
|
||||
|
Loading…
Reference in New Issue
Block a user