Explorar el Código

fix link generation

Pi hace 4 meses
padre
commit
e62c5cec49
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2 3
      home-sqlpage/sqlpage/link.sql

+ 2 - 3
home-sqlpage/sqlpage/link.sql

@@ -1,6 +1,5 @@
 SET url = 'https://shandan.one/normalize?hash=' || sqlpage.url_encode($hash);
 SET api_results = sqlpage.fetch($url);
-SELECT 'debug' AS component;
-SELECT $api_results AS ret;
-SET link = COALESCE('https://shandan.one/'||$tool||'/'||$api_results->>'o', NULL);
+SET hash = $api_results->>'o';
+SET link = COALESCE('https://shandan.one/'||$tool||'/'||$hash, NULL);
 SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/Link.sql') AS properties;