Commit bba466ed authored by Jan Marchel's avatar Jan Marchel
Browse files

preparing mocked services

parent f0915f63
Pipeline #17744 passed with stages
in 41 minutes and 37 seconds
......@@ -30,25 +30,35 @@ public class UserController {
private UserService userService;
@PostMapping("/user/userProfile")
@ResponseStatus(HttpStatus.CREATED)
public UserProfile getUserProfile() {
UserProfile userProfile = new UserProfile();
return userProfile;
@GetMapping("/user/userProfile")
@ResponseStatus(HttpStatus.OK)
public UserProfile getUserProfile(@RequestHeader(value = HttpHeaders.AUTHORIZATION) String token, @RequestBody String userId){
return UserProfile.builder()
.email("melodic@melodic.com")
.firstName("melodic")
.lastName("melodic")
.role(UserRole.USER)
.build();
}
@PostMapping("/user/resources")
@ResponseStatus(HttpStatus.CREATED)
public Resources getResources() {
Resources resources = new Resources();
return resources;
@GetMapping("/user/resources")
@ResponseStatus(HttpStatus.OK)
public Resources getResources(@RequestHeader(value = HttpHeaders.AUTHORIZATION) String token, @RequestBody String userId) {
return Resources.builder()
.resourceName("Deployment")
.resourceType("Process")
.build();
}
@PostMapping("/user/activities")
@ResponseStatus(HttpStatus.CREATED)
public Activities getActivities() {
Activities activities = new Activities();
return activities;
@GetMapping
@ResponseStatus(HttpStatus.OK)
public Activities getActivities(@RequestHeader(value = HttpHeaders.AUTHORIZATION) String token, @RequestBody String userId) {
return Activities.builder()
.eventName("Deployment")
.eventTime("10-10-2021")
.resourceName("Process")
.resourceType("Deployment").build();
}
@PostMapping("/user/login")
......
package eu.melodic.upperware.guibackend.model.user;
import lombok.Builder;
@Builder
public class Activities {
String eventTime;
......
package eu.melodic.upperware.guibackend.model.user;
import lombok.Builder;
@Builder
public class Resources {
String resourceType;
......
package eu.melodic.upperware.guibackend.model.user;
import lombok.Builder;
@Builder
public class UserProfile {
String firstName;
String lastName;
String email;
String role;
UserRole role;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment