1
0
Просмотр исходного кода

feat: 创建gitlab账户的功能。因为新门户暂时用不了,暂时将这功能启用

370774330@qq.com 5 лет назад
Родитель
Сommit
48691308eb
1 измененных файлов с 11 добавлено и 11 удалено
  1. 11 11
      web/src/main/java/cn/seecoder/web/controller/user/UserController.java

+ 11 - 11
web/src/main/java/cn/seecoder/web/controller/user/UserController.java

@@ -1,14 +1,15 @@
 package cn.seecoder.web.controller.user;
 
+import cn.seecoder.common.exceptions.ServiceException;
 import cn.seecoder.web.model.vo.Response;
+import cn.seecoder.web.model.vo.user.GitlabUserCreateVO;
 import cn.seecoder.web.model.vo.user.UserVO;
 import cn.seecoder.web.service.user.UserService;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * @author PuHong Weng
@@ -27,14 +28,13 @@ public class UserController {
         this.userService = userService;
     }
 
-//    @Deprecated
-//    @ApiOperation(value = "创建gitlab用户", httpMethod = "POST")
-//    @PostMapping("/gitlab")
-//    @ApiImplicitParam(value = "vo",dataType = "object", paramType = "body")
-//    public Response createGitlabUser(@RequestBody GitlabUserCreateVO vo) throws ServiceException {
-//        userService.createGitlabUser(vo);
-//        return Response.buildSuccess();
-//    }
+    @ApiOperation(value = "创建gitlab用户", httpMethod = "POST")
+    @PostMapping("/gitlab")
+    @ApiImplicitParam(value = "vo",dataType = "object", paramType = "body")
+    public Response createGitlabUser(@RequestBody GitlabUserCreateVO vo) throws ServiceException {
+        userService.createGitlabUser(vo);
+        return Response.buildSuccess();
+    }
 
     @ApiOperation(value = "获取当前登陆的用户信息", httpMethod = "GET")
     @GetMapping("/self")