dolozone
This commit is contained in:
+20
-2
@@ -12,7 +12,7 @@ services:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
||||
listhub_backend:
|
||||
build: .
|
||||
build: '../backend'
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
@@ -25,7 +25,25 @@ services:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- listhub_data:/app
|
||||
loki:
|
||||
image: grafana/loki:2.9.2
|
||||
container_name: loki
|
||||
ports:
|
||||
- "3100:3100"
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
restart: unless-stopped
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_PASSWORD=admin # Hasło do pierwszego logowania
|
||||
depends_on:
|
||||
- loki
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
listhub_data:
|
||||
listhub_data:
|
||||
|
||||
@@ -31,6 +31,11 @@
|
||||
<lombok.version>1.18.46</lombok.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.loki4j</groupId>
|
||||
<artifactId>loki-logback-appender</artifactId>
|
||||
<version>1.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
|
||||
@@ -6,6 +6,7 @@ import _11.asktpk.artisanconnectbackend.dto.*;
|
||||
import _11.asktpk.artisanconnectbackend.security.JwtUtil;
|
||||
import _11.asktpk.artisanconnectbackend.service.AuthService;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -45,8 +46,8 @@ public class AuthController {
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/register")
|
||||
public ResponseEntity<?> register(@RequestBody ClientRegistrationDTO clientRegistrationDTO) {
|
||||
@PostMapping("/register")//****************************
|
||||
public ResponseEntity<?> register(@Valid @RequestBody ClientRegistrationDTO clientRegistrationDTO) { // <-- Dodane @Valid przed @RequestBody
|
||||
if (clientRegistrationDTO.getEmail() == null || clientRegistrationDTO.getPassword() == null
|
||||
|| clientRegistrationDTO.getEmail().isEmpty() || clientRegistrationDTO.getPassword().isEmpty()) {
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new RequestResponseDTO("Przekazano puste login lub hasło"));
|
||||
|
||||
Reference in New Issue
Block a user