Update client server

This commit is contained in:
cugurlu
2019-03-04 17:54:50 +01:00
parent 85e62256c1
commit da2d08a279
157 changed files with 7010 additions and 177 deletions

View File

@@ -0,0 +1,26 @@
package gogreen.server.rest;
import gogreen.common.UserDTO;
import gogreen.server.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class UserController {
@Autowired
UserService userService;
@RequestMapping("/registerUser")
public UserDTO registerUser(@RequestParam(value="name") String name,
@RequestParam(value="password") String password) {
return userService.registerUser(name, password);
}
@RequestMapping("/login")
public UserDTO login(@RequestParam(value="name") String name,
@RequestParam(value="password") String password) {
return userService.login(name, password);
}
}