Compare commits
1
Commits
e7481a53d7
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47cde9caa5 |
@@ -1,36 +0,0 @@
|
|||||||
### MODULES
|
|
||||||
|
|
||||||
-api
|
|
||||||
- register +
|
|
||||||
- logut +
|
|
||||||
- login +
|
|
||||||
- check-demo-status
|
|
||||||
- check-token-balance
|
|
||||||
- content
|
|
||||||
- dismiss-notification
|
|
||||||
- download
|
|
||||||
- download-certificate
|
|
||||||
- download-pdf-tracked
|
|
||||||
- export-report
|
|
||||||
- forgor-password
|
|
||||||
- generate-certificate
|
|
||||||
- get-pdf-tracking-token
|
|
||||||
- get-user-data
|
|
||||||
- login ?
|
|
||||||
- logaut ?
|
|
||||||
- notifications-api
|
|
||||||
- preview-certificate
|
|
||||||
- register
|
|
||||||
- reports
|
|
||||||
- reset-password
|
|
||||||
- token-manager
|
|
||||||
- track-pdf-open
|
|
||||||
- upload
|
|
||||||
- validate-upload
|
|
||||||
- verify-video
|
|
||||||
- violations
|
|
||||||
|
|
||||||
infra
|
|
||||||
-grafana/prom +
|
|
||||||
- ci/cd
|
|
||||||
|
|
||||||
@@ -16,7 +16,6 @@ services:
|
|||||||
|
|
||||||
app:
|
app:
|
||||||
image: popovtsev/ncp
|
image: popovtsev/ncp
|
||||||
# build: .
|
|
||||||
container_name: no_copy_app
|
container_name: no_copy_app
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: no_copy_
|
POSTGRES_DB: no_copy_
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
package ru.soune.no_copy.controller;
|
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import ru.soune.no_copy.dto.UserDTO;
|
|
||||||
import ru.soune.no_copy.repository.UserRepository;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/api/user")
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class UserController {
|
|
||||||
|
|
||||||
private final UserRepository userRepository;
|
|
||||||
|
|
||||||
@GetMapping("/all")
|
|
||||||
public ResponseEntity<List<UserDTO>> getAllUsers() {
|
|
||||||
List<UserDTO> allUsers = userRepository.findAll().stream()
|
|
||||||
.map(u -> new UserDTO(u.getFirstName(), u.getEmail(), u.getIsActive()))
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
return ResponseEntity.ok(allUsers);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
package ru.soune.no_copy.dto;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class UserDTO {
|
|
||||||
private String fullName;
|
|
||||||
private String email;
|
|
||||||
private boolean isActive;
|
|
||||||
}
|
|
||||||
@@ -53,6 +53,6 @@ public class User {
|
|||||||
private LocalDateTime createdAt;
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
@Column(name = "is_active")
|
@Column(name = "is_active")
|
||||||
private Boolean isActive = true;
|
private Boolean isActive;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user