diff --git a/js/src/Main.js b/js/src/Main.js index a1a6004..22d506d 100644 --- a/js/src/Main.js +++ b/js/src/Main.js @@ -34,7 +34,7 @@ const Main = () => { - + Match Additions diff --git a/js/src/Reports.js b/js/src/Reports.js index 05c8197..41da293 100644 --- a/js/src/Reports.js +++ b/js/src/Reports.js @@ -17,7 +17,6 @@ import Typography from '@material-ui/core/Typography' import ReactCountryFlag from 'react-country-flag' import {format, subMonths} from 'date-fns' -import humanizeDuration from 'humanize-duration' import AppLink from './util/AppLink' import DataQuery from './util/DataQuery' @@ -72,7 +71,7 @@ const LongestMatchesSection = ({data}) => { {index + 1} - {humanizeDuration(match.duration_secs * 1000)} + {match.duration} )} diff --git a/js/src/Search.js b/js/src/Search.js index ef7d3bf..c6e6fc1 100644 --- a/js/src/Search.js +++ b/js/src/Search.js @@ -34,7 +34,7 @@ const GeneralSection = ({data}) => { - + diff --git a/js/src/graphql/Report.js b/js/src/graphql/Report.js index 59aedb0..dd67925 100644 --- a/js/src/graphql/Report.js +++ b/js/src/graphql/Report.js @@ -94,7 +94,7 @@ query Report($year: Int!, $month: Int!) { diplomacy_type team_size map_name - duration_secs + duration } } } diff --git a/js/src/match/Map.js b/js/src/match/Map.js index 5d7a0ff..7ef2fdf 100644 --- a/js/src/match/Map.js +++ b/js/src/match/Map.js @@ -25,7 +25,7 @@ const Map = ({match}) => { Size {match.map_events && Events} - Seed + {match.rms_seed && Seed} Custom Fixed Positions Tech Effects @@ -39,7 +39,7 @@ const Map = ({match}) => { ])} } - {match.rms_seed} + {match.rms_seed && {match.rms_seed}} diff --git a/python/aocrecs/logic/search.py b/python/aocrecs/logic/search.py index 6a46708..84ea5d3 100644 --- a/python/aocrecs/logic/search.py +++ b/python/aocrecs/logic/search.py @@ -51,7 +51,7 @@ def build_query(params, offset, limit): query = append_flags(query, params, args) - query_template = "select distinct matches.id {} order by matches.id desc limit {} offset {}" + query_template = "select distinct matches.id, matches.played {} order by matches.played desc nulls last limit {} offset {}" return query_template.format(query, limit, offset), 'select count(distinct matches.id) {}'.format(query), args diff --git a/python/setup.py b/python/setup.py index 0a0d736..6c28106 100644 --- a/python/setup.py +++ b/python/setup.py @@ -3,7 +3,7 @@ setup( name='aocrecs', - version='3.0.2', + version='4.0.0', description='aocrecs.com API.', url='https://github.com/siegeengineers/aocrecs.com/', license='MIT', @@ -18,7 +18,7 @@ 'boto3==1.10.46', 'coloredlogs==10.0', 'databases==0.2.6', - 'mgzdb>=1.2.9', + 'mgzdb>=1.3.0', 'networkx==2.4', 'python-dateutil==2.8.1', 'python-multipart==0.0.5',