fix: Default remote nodes table sort by last_checked

This commit is contained in:
Christian Ditaputratama 2024-11-07 00:53:01 +07:00
parent e66f5bb1b8
commit d60dbd86be
No known key found for this signature in database
GPG key ID: 31D3D06D77950979

View file

@ -137,7 +137,7 @@ func (s *fiberServer) remoteNodesHandler(c *fiber.Ctx) error {
Paging: paging.Paging{ Paging: paging.Paging{
Limit: c.QueryInt("limit", 10), // rows per page Limit: c.QueryInt("limit", 10), // rows per page
Page: c.QueryInt("page", 1), Page: c.QueryInt("page", 1),
SortBy: c.Query("sort_by", "id"), SortBy: c.Query("sort_by", "last_checked"),
SortDirection: c.Query("sort_direction", "desc"), SortDirection: c.Query("sort_direction", "desc"),
Refresh: c.Query("refresh"), Refresh: c.Query("refresh"),
}, },
@ -271,7 +271,7 @@ func (s *fiberServer) nodesAPI(c *fiber.Ctx) error {
Paging: paging.Paging{ Paging: paging.Paging{
Limit: c.QueryInt("limit", 10), // rows per page Limit: c.QueryInt("limit", 10), // rows per page
Page: c.QueryInt("page", 1), Page: c.QueryInt("page", 1),
SortBy: c.Query("sort_by", "id"), SortBy: c.Query("sort_by", "last_checked"),
SortDirection: c.Query("sort_direction", "desc"), SortDirection: c.Query("sort_direction", "desc"),
Refresh: c.Query("refresh"), Refresh: c.Query("refresh"),
}, },