diff --git a/applications/api.moon b/applications/api.moon index c01d166..fbfd199 100644 --- a/applications/api.moon +++ b/applications/api.moon @@ -4,7 +4,7 @@ import assert_valid from require "lapis.validate" import APIKeys, Users, Tasks from require "models" import autoload from require "locator" -import api_request from autoload "helpers" +import api_request from autoload "helpers.api" -- import random from locate "calc" -- import escape_similar_to from locate "db" @@ -12,7 +12,7 @@ class API extends Application @path: "/v1" @name: "api_" - @before_filter( api_request => + @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 -- this does not seem to be triggering!!! @api_key = APIKeys\find key: @params.api_key diff --git a/locator_config.moon b/locator_config.moon index 0daefc0..542b57e 100644 --- a/locator_config.moon +++ b/locator_config.moon @@ -9,6 +9,9 @@ { path: "applications" } + -- { -- not actually useful + -- path: "helpers" + -- } { path: "utility" remote: {