feat: obj list api

This commit is contained in:
Noah Hsu
2022-06-27 19:51:23 +08:00
parent c6007aa9e6
commit 7c0b86a9cd
10 changed files with 157 additions and 24 deletions

View File

@ -4,3 +4,12 @@ type PageReq struct {
PageIndex int `json:"page_index" form:"page_index"`
PageSize int `json:"page_size" form:"page_size"`
}
func (p *PageReq) Validate() {
if p.PageIndex < 1 {
p.PageIndex = 1
}
if p.PageSize < 1 {
p.PageSize = 50
}
}