package com.xingxi.api.controller;

import com.xingxi.api.common.BaseApiController;
import com.xingxi.api.model.WxLogoutRequest;
import com.xingxi.api.model.WxLogoutResponse;
import com.xingxi.api.service.WxmaUserServiceI;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequestMapping("/api/store/wxlogout")
@RequiredArgsConstructor
public class WxLogoutApiController extends BaseApiController {
    private final WxmaUserServiceI wxmaUserServiceI;

    @PostMapping
    public WxLogoutResponse logout(WxLogoutRequest request){
        wxmaUserServiceI.userExit(getUserContext(), request);
        return new WxLogoutResponse();
    }
}
