@RequestMapping("/login") public Result<Member> login(Member member) { Member _member = memberService.findByEmailAndPassword(member.getEmail(), member.getPassword()); member = null; if (null != _member) { return new Result<Member>(_member); } else { return new Result<Member>("Email of Password not valid"); } }
@RequestMapping("/delete/{id}") public void delete(@PathVariable String id) { memberService.delete(new Member(id)); }
@RequestMapping("/save") public Result<Member> save(Member member) { memberService.save(member); return new Result<Member>(member); }
@RequestMapping("/{id}") public Result<Member> findById(@PathVariable String id) { return new Result<Member>(memberService.findById(id)); }
@RequestMapping("/team/{teamName}/members") public Result<List<Member>> projectMembers(@PathVariable String teamName) { return new Result<List<Member>>(memberService.findByTeamName(teamName)); }
@RequestMapping("/list") public Result<List<Member>> list() { return new Result<List<Member>>(memberService.findAll()); }