init repo

This commit is contained in:
VaalaCat
2024-08-28 00:02:28 +08:00
committed by vaalacat
commit 13148b95e3
97 changed files with 10214 additions and 0 deletions

16
biz/user/get.go Normal file
View File

@@ -0,0 +1,16 @@
package user
import (
"context"
"github.com/nose7en/ToyBoomServer/common"
"github.com/nose7en/ToyBoomServer/defs"
"github.com/samber/lo"
)
func GetUserInfo(c context.Context, req *defs.CommonRequest) (resp *defs.GetUserInfoResponse, err error) {
userInfo := common.GetUser(c)
return &defs.GetUserInfoResponse{
User: lo.ToPtr(userInfo.ToUser()),
}, nil
}