package user

import (
	"net/http"

	"in-server/app/main/api/internal/logic/user"
	"in-server/app/main/api/internal/svc"
	"in-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)
	}
}
