upload
This commit is contained in:
@@ -78,6 +78,15 @@ type ResponseList struct {
|
||||
Data any `json:"data"`
|
||||
}
|
||||
|
||||
func NewResponseList(count int64, data any) ResponseList {
|
||||
return ResponseList{
|
||||
Code: 0,
|
||||
Message: "OK",
|
||||
Count: count,
|
||||
Data: data,
|
||||
}
|
||||
}
|
||||
|
||||
func respond(w http.ResponseWriter, data any) {
|
||||
v, err := json.Marshal(data)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user