source: src/main/java/edu/gjoko/schedlr/controllers/rest/UserApi.java@ 77205be

Last change on this file since 77205be was 77205be, checked in by gjoko kostadinov <gjokokostadinov@…>, 6 months ago

Add entire code

  • Property mode set to 100755
File size: 574 bytes
Line 
1package edu.gjoko.schedlr.controllers.rest;
2
3import lombok.AllArgsConstructor;
4import org.springframework.web.bind.annotation.GetMapping;
5import org.springframework.web.bind.annotation.RequestMapping;
6import org.springframework.web.bind.annotation.RestController;
7
8import javax.servlet.http.HttpServletRequest;
9
10@RestController
11@RequestMapping("api/user")
12@AllArgsConstructor
13public class UserApi {
14
15 @GetMapping(path = "/me")
16 public boolean findAll(HttpServletRequest request) {
17 return request.getSession(true).getAttribute("stakeholderId") != null;
18 }
19}
Note: See TracBrowser for help on using the repository browser.