package user

import (
	"net/http"

	"ycc-server/app/main/api/internal/logic/user"
	"ycc-server/app/main/api/internal/svc"
	"ycc-server/common/result"
)

func CancelOutHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		l := user.NewCancelOutLogic(r.Context(), svcCtx)
		err := l.CancelOut()
		result.HttpResult(r, w, nil, err)
	}
}
