Merge remote-tracking branch 'origin/master'
# Conflicts: # internal/controller/task/task_v1_ranking.go
This commit is contained in:
17
internal/controller/user/user_v1_get_bound_url.go
Normal file
17
internal/controller/user/user_v1_get_bound_url.go
Normal file
@ -0,0 +1,17 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
"server/internal/service"
|
||||
|
||||
"server/api/user/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) GetBoundUrl(ctx context.Context, req *v1.GetBoundUrlReq) (res *v1.GetBoundUrlRes, err error) {
|
||||
out, err := service.User().BoundUrl(ctx, &model.UserBoundUrlIn{PopenId: req.PopenId, AppName: req.AppName, BindType: req.BindType, IsBound: true})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &v1.GetBoundUrlRes{Url: out.Url}, nil
|
||||
}
|
||||
17
internal/controller/user/user_v1_get_unbound_url.go
Normal file
17
internal/controller/user/user_v1_get_unbound_url.go
Normal file
@ -0,0 +1,17 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
"server/internal/service"
|
||||
|
||||
"server/api/user/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) GetUnboundUrl(ctx context.Context, req *v1.GetUnboundUrlReq) (res *v1.GetUnboundUrlRes, err error) {
|
||||
out, err := service.User().UnBoundUrl(ctx, &model.UserBoundUrlIn{PopenId: req.PopenId, AppName: req.AppName, BindType: req.BindType, IsBound: false, Nickname: req.Nickname})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &v1.GetUnboundUrlRes{Url: out.Url}, nil
|
||||
}
|
||||
17
internal/controller/user/user_v1_get_user_bound_info.go
Normal file
17
internal/controller/user/user_v1_get_user_bound_info.go
Normal file
@ -0,0 +1,17 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
"server/internal/service"
|
||||
|
||||
"server/api/user/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) GetUserBoundInfo(ctx context.Context, req *v1.GetUserBoundInfoReq) (res *v1.GetUserBoundInfoRes, err error) {
|
||||
out, err := service.User().BoundInfo(ctx, &model.UserBoundInfoIn{PopenId: req.PopenId})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &v1.GetUserBoundInfoRes{IsBound: out.IsBound}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user