基于SpringBoot的AI游戏对战平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
945 B

package com.kob.backend.controller.user.account.acwing;
import com.alibaba.fastjson.JSONObject;
import com.kob.backend.service.user.account.acwing.WebService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@RestController
public class WebController {
@Autowired
private WebService webService;
@GetMapping("/api/user/account/acwing/web/apply_code/")
public JSONObject applyCode() {
return webService.applyCode();
}
@GetMapping("/api/user/account/acwing/web/receive_code/")
public JSONObject receiveCode(@RequestParam Map<String,String> data) {
String code = data.get("code");
String state = data.get("state");
return webService.receiveCode(code,state);
}
}