diff --git a/src/views/admin/UserList.vue b/src/views/admin/UserList.vue index 9261dd6..e103d4f 100644 --- a/src/views/admin/UserList.vue +++ b/src/views/admin/UserList.vue @@ -11,12 +11,16 @@ const search = ref(''); async function loadItems(options: { page: number; itemsPerPage: number; - sortBy: string[]; + sortBy: { + key: string, + order: 'asc' | 'desc' + }[]; sortDesc: boolean; }) { loading.value = true; + console.log(options) const response = await doFetchGet( - `/api/admin/user/list?page=${options.page}&pageSize=${options.itemsPerPage}&sort=${options.sortBy[0]}&order=${options.sortDesc ? 'desc' : 'asc'}&search=${search.value}`, + `/api/admin/user/list?page=${options.page}&pageSize=${options.itemsPerPage}&sort=${options.sortBy[0]?.key}&order=${options.sortBy[0]?.order}&search=${search.value}`, ); if (response.ok) { const data: {