diff --git a/app/views/admin/client_applications/api_key.html.erb b/app/views/admin/client_applications/api_key.html.erb index ab8f605274..11c4f643eb 100644 --- a/app/views/admin/client_applications/api_key.html.erb +++ b/app/views/admin/client_applications/api_key.html.erb @@ -47,7 +47,11 @@
-

<%= CartoDB.base_url(current_user.username) %>/api/v2/sql?q=INSERT INTO table_name (the_geom, observation) VALUES (ST_GeomFromText(’POINT(-71.2 42.5)’, 4326),'rare bird spotted')&api_key=<%= current_user.api_key %>

+ <% if CartoDB.subdomainless_urls? %> +

https://<%= CartoDB.account_host %>/user/<%= current_user.username %>/api/v2/sql?q=INSERT INTO table_name (the_geom, observation) VALUES (ST_GeomFromText(’POINT(-71.2 42.5)’, 4326),'rare bird spotted')&api_key=<%= current_user.api_key %>

+ <% else %> +

https://<%= current_user.username %>.<%= CartoDB.account_host %>/api/v2/sql?q=INSERT INTO table_name (the_geom, observation) VALUES (ST_GeomFromText(’POINT(-71.2 42.5)’, 4326),'rare bird spotted')&api_key=<%= current_user.api_key %>

+ <% end%>
@@ -56,7 +60,11 @@
-

<%= CartoDB.base_url(current_user.username) %>/api/v2/sql?q=SELECT * FROM private_table&api_key=<%= current_user.api_key %>

+ <% if CartoDB.subdomainless_urls? %> +

https://<%= CartoDB.account_host %>/user/<%= current_user.username %>/api/v2/sql?q=SELECT * FROM private_table&api_key=<%= current_user.api_key %>

+ <% else %> +

https://<%= current_user.username %>.<%= CartoDB.account_host %>/api/v2/sql?q=SELECT * FROM private_table&api_key=<%= current_user.api_key %>

+ <% end %>