Add properties for user and geocoder config keys instead of hardcode it in the template
This commit is contained in:
@@ -8,11 +8,11 @@ CREATE OR REPLACE FUNCTION <%= GEOCODER_CLIENT_SCHEMA %>.<%= name %> (<%= params
|
||||
RETURNS <%= return_type %> AS $$
|
||||
DECLARE
|
||||
ret <%= return_type %>;
|
||||
user_config JSON;
|
||||
geocoder_config JSON;
|
||||
user_config json;
|
||||
geocoder_config json;
|
||||
BEGIN
|
||||
SELECT cartodb.CDB_Conf_GetConf('user_config') INTO user_config;
|
||||
SELECT cartodb.CDB_Conf_GetConf('geocoder_config') INTO geocoder_config;
|
||||
SELECT cartodb.CDB_Conf_GetConf('<%= user_config_key %>') INTO user_config;
|
||||
SELECT cartodb.CDB_Conf_GetConf('<%= geocoder_config_key %>') INTO geocoder_config;
|
||||
SELECT <%= GEOCODER_CLIENT_SCHEMA %>._<%= name %>(session_user, user_config, geocoder_config, <%= params %>) INTO ret;
|
||||
RETURN ret;
|
||||
END;
|
||||
|
||||
Reference in New Issue
Block a user