Pi 4 месяцев назад
Родитель
Сommit
bb9a7852de
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      rest/pyapi.py
  2. 1 1
      util-sqlpage/code/recent.sql

+ 1 - 1
rest/pyapi.py

@@ -83,7 +83,7 @@ def get_hash(route):
         assert data['encoding'] == 'base64', f"unsupported encoding: {data['encoding']}"
         data = b64decode(data['data'] + '==')
     elif route == 'code':
-        data = dumps(loads(body['data']), sort_keys=True)
+        data = dumps(loads(body['data']), sort_keys=True).encode('utf-8')
     else:
         data = data.encode('utf-8')
 

+ 1 - 1
util-sqlpage/code/recent.sql

@@ -40,5 +40,5 @@ WHERE (
       ELSE $store = cd.store
     END
 )
-ORDER BY expiry, type, c.hash NULLS FIRST
+ORDER BY expiry, created DESC, type, c.hash NULLS FIRST
 ;