From 9d995e47fd743f1a8ba18ee9daac7e822ad63660 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 27 Jan 2017 15:11:51 +0100 Subject: api: /winrates endpoint --- queries/recent-matches.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'queries/recent-matches.sql') diff --git a/queries/recent-matches.sql b/queries/recent-matches.sql index fb237d7..9295813 100644 --- a/queries/recent-matches.sql +++ b/queries/recent-matches.sql @@ -1,7 +1,7 @@ -SELECT ARRAY_TO_JSON(ARRAY( +SELECT ARRAY_TO_JSON(ARRAY( SELECT JSONB_BUILD_OBJECT( - 'id', match.data->>'id', + 'id', (match.data->'attributes'->>'shardId') || (match.data->>'id'), 'date', match.data->'attributes'->>'createdAt', 'duration', CAST( match.data->'attributes'->>'duration' @@ -27,4 +27,4 @@ SELECT ) FROM match ORDER BY match.data->'attributes'->>'createdAt' DESC -)) AS data +)) AS data; \ No newline at end of file -- cgit v1.3.1