package com.sptg.permissions.biz.controller;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.common.core.util.aliface.FaceDetectUtil;
import com.sptg.permissions.api.feigns.FaceVerifyFeign;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;


@RestController
@RequiredArgsConstructor
@Slf4j
public class FaceVerifyController implements FaceVerifyFeign {


    @Override
    @GetMapping(value = "/faceVerify/verify")
    public ResultBean verify(@RequestParam(value = "faceUrl") String faceUrl) {
        FaceDetectUtil faceDetectUtil = new FaceDetectUtil();
        ResultBean resultBean = faceDetectUtil.detectImage(faceUrl);
        return resultBean;
    }
}
