diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index a5370d6..1f1c14f 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,8 +4,10 @@
-
+
+
+
@@ -151,7 +153,6 @@
-
@@ -176,7 +177,8 @@
-
+
+
true
diff --git a/pkg/internal/server/admin/users_api.go b/pkg/internal/server/admin/users_api.go
index 6315880..7e919ca 100644
--- a/pkg/internal/server/admin/users_api.go
+++ b/pkg/internal/server/admin/users_api.go
@@ -22,7 +22,7 @@ func listUser(c *fiber.Ctx) error {
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
}
var items []models.Account
- if err := database.C.Offset(offset).Limit(take).Find(&items).Error; err != nil {
+ if err := database.C.Offset(offset).Limit(take).Order("id ASC").Find(&items).Error; err != nil {
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
}
diff --git a/web/src/views/admin/users.vue b/web/src/views/admin/users.vue
index 6b00a4b..eb027ef 100644
--- a/web/src/views/admin/users.vue
+++ b/web/src/views/admin/users.vue
@@ -114,6 +114,9 @@ const pagination = reactive({
})
async function readUsers({ page, itemsPerPage }: { page?: number; itemsPerPage?: number }) {
+ if (itemsPerPage) pagination.pageSize = itemsPerPage
+ if (page) pagination.page = page
+
reverting.value = true
const res = await request(
"/api/admin/users?" +