chore: update memo service (#1138)

* chore: update memo service

* chore: update
This commit is contained in:
boojack
2023-02-22 20:07:55 +08:00
committed by GitHub
parent 42d849abfc
commit 29124f56bb
19 changed files with 59 additions and 133 deletions

View File

@ -1,5 +1,8 @@
package api
// MaxContentLength means the max memo content bytes is 1MB.
const MaxContentLength = 1 << 30
// Visibility is the type of a visibility.
type Visibility string
@ -37,7 +40,6 @@ type Memo struct {
Content string `json:"content"`
Visibility Visibility `json:"visibility"`
Pinned bool `json:"pinned"`
DisplayTs int64 `json:"displayTs"`
// Related fields
Creator *User `json:"creator"`
@ -86,8 +88,8 @@ type MemoFind struct {
VisibilityList []Visibility
// Pagination
Limit int
Offset int
Limit *int
Offset *int
}
type MemoDelete struct {