From d60dbd86be9f28669f15c9b272ef152dbdd30608 Mon Sep 17 00:00:00 2001 From: Christian Ditaputratama Date: Thu, 7 Nov 2024 00:53:01 +0700 Subject: [PATCH] fix: Default remote nodes table sort by last_checked --- internal/handler/response.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/handler/response.go b/internal/handler/response.go index 89e28af..be5de1a 100644 --- a/internal/handler/response.go +++ b/internal/handler/response.go @@ -137,7 +137,7 @@ func (s *fiberServer) remoteNodesHandler(c *fiber.Ctx) error { Paging: paging.Paging{ Limit: c.QueryInt("limit", 10), // rows per page Page: c.QueryInt("page", 1), - SortBy: c.Query("sort_by", "id"), + SortBy: c.Query("sort_by", "last_checked"), SortDirection: c.Query("sort_direction", "desc"), Refresh: c.Query("refresh"), }, @@ -271,7 +271,7 @@ func (s *fiberServer) nodesAPI(c *fiber.Ctx) error { Paging: paging.Paging{ Limit: c.QueryInt("limit", 10), // rows per page Page: c.QueryInt("page", 1), - SortBy: c.Query("sort_by", "id"), + SortBy: c.Query("sort_by", "last_checked"), SortDirection: c.Query("sort_direction", "desc"), Refresh: c.Query("refresh"), },