Class RootController

java.lang.Object
callofproject.dev.authentication.controller.RootController

@RestController @RequestMapping("api/auth/root") public class RootController extends Object
Authentication Controller Copyleft (C), 2023, Cal-of-Project-Teams Developers. All Rights free.
  • Constructor Details

    • RootController

      public RootController(RootService rootService)
      Constructor for the RootController class. It is used to inject dependencies into the controller.
      Parameters:
      rootService - The RootService object to be injected.
  • Method Details

    • giveAdminRoleToUser

      @PostMapping("/give/role/admin") public org.springframework.http.ResponseEntity<Object> giveAdminRoleToUser(String username)
      Give role to User.
      Parameters:
      username - represent the username
      Returns:
      boolean value success or not
    • removeAdminRoleFromUser

      @PostMapping("/remove/role/admin") public org.springframework.http.ResponseEntity<Object> removeAdminRoleFromUser(String username)
      Remove role from User.
      Parameters:
      username - represent the username
      Returns:
      boolean value success or not