feat: delete useless
This commit is contained in:
@@ -3,21 +3,8 @@ package util
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/unknwon/com"
|
||||
|
||||
"message-nest/pkg/setting"
|
||||
)
|
||||
|
||||
// GetPage get page parameters
|
||||
func GetPage(c *gin.Context) int {
|
||||
result := 0
|
||||
page := com.StrTo(c.Query("page")).MustInt()
|
||||
if page > 0 {
|
||||
result = (page - 1) * setting.AppSetting.PageSize
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
func GetPageSize(c *gin.Context) (int, int) {
|
||||
result := 0
|
||||
page := com.StrTo(c.Query("page")).MustInt()
|
||||
|
||||
Reference in New Issue
Block a user