feat: bind tribally account
This commit is contained in:
22
internal/handler/task/bind_tribally_handler.go
Normal file
22
internal/handler/task/bind_tribally_handler.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package task
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"nova_task/internal/logic/task"
|
||||
"nova_task/internal/svc"
|
||||
)
|
||||
|
||||
// 绑定Tribally账号
|
||||
func BindTriballyHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := task.NewBindTriballyLogic(r.Context(), svcCtx)
|
||||
resp, err := l.BindTribally()
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user