feat(app): update
This commit is contained in:
@ -13,7 +13,7 @@ const (
|
||||
|
||||
type Response struct {
|
||||
Code string
|
||||
Result interface{}
|
||||
Result any
|
||||
Msg string
|
||||
}
|
||||
|
||||
@ -31,13 +31,13 @@ func Invalid() string {
|
||||
return string(str)
|
||||
}
|
||||
|
||||
func Success(data interface{}) Response {
|
||||
func Success(data any) Response {
|
||||
response := Response{Code: SuccessCode, Result: data}
|
||||
return response
|
||||
}
|
||||
|
||||
func Page(data interface{}, count int64) Response {
|
||||
response := Response{Code: SuccessCode, Result: map[string]interface{}{
|
||||
func Page(data any, count int64) Response {
|
||||
response := Response{Code: SuccessCode, Result: map[string]any{
|
||||
"List": data,
|
||||
"Count": count,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user