Skip to content
Snippets Groups Projects
Commit 045c1d13 authored by Martin Gargalovič's avatar Martin Gargalovič
Browse files

user login and logout + login dto

parent 89747584
No related branches found
No related tags found
1 merge request!13Language school user
package org.fuseri.model.dto.user;
import org.fuseri.model.dto.common.DomainObjectDto;
public class UserLoginDto extends DomainObjectDto {
private String username;
private String password;
}
package org.fuseri.modulelanguageschool.user;
import org.apache.coyote.Response;
import org.fuseri.model.dto.common.Result;
import org.fuseri.model.dto.user.UserCreateDto;
import org.fuseri.model.dto.user.UserDto;
import org.fuseri.model.dto.user.UserLoginDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
@RestController
......@@ -34,4 +37,18 @@ public class UserController {
public Result<UserDto> findAll(@RequestParam int page) {
return mapper.toResult(service.findAll(page));
}
@PostMapping("/login")
public ResponseEntity login(@RequestBody UserLoginDto dto) {
return ResponseEntity.ok("dummy login");
}
@PostMapping("/logout")
public ResponseEntity logout() {
return ResponseEntity.ok("dummy logout");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment