Add /people API endpoint; allow for "native sort"

This commit is contained in:
Lance Edgar 2021-09-03 16:26:15 -05:00
parent d671b18215
commit fa700d53ad
3 changed files with 61 additions and 0 deletions

View file

@ -129,6 +129,10 @@ class APIMasterView(APIView):
def make_sort_spec(self):
# we prefer a "native sort"
if self.request.GET.has_key('nativeSort'):
return json.loads(self.request.GET.getone('nativeSort'))
# these params are based on 'vuetable-2'
# https://www.vuetable.com/guide/sorting.html#initial-sorting-order
if 'sort' in self.request.params: