Merge branch 'master' into Max/Backend/loginApi
This commit is contained in:
		@ -5,7 +5,6 @@ import org.springframework.http.HttpStatus;
 | 
			
		||||
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.UserRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Responses.UnauthorizedResponse;
 | 
			
		||||
import ovh.herisson.Clyde.Services.TokenService;
 | 
			
		||||
import ovh.herisson.Clyde.Services.UserService;
 | 
			
		||||
@ -20,7 +19,7 @@ public class UserController {
 | 
			
		||||
 | 
			
		||||
    private final TokenService tokenService;
 | 
			
		||||
    public UserController(UserService userService, TokenService tokenService){
 | 
			
		||||
        this.userService =userService;
 | 
			
		||||
        this.userService = userService;
 | 
			
		||||
        this.tokenService = tokenService; // todo find a way to be clearer
 | 
			
		||||
 | 
			
		||||
        tokenService.postMockToken(userService.postMockUsers());// todo find a better place to put that
 | 
			
		||||
 | 
			
		||||
@ -6,8 +6,6 @@ import org.springframework.context.annotation.Bean;
 | 
			
		||||
import org.springframework.context.annotation.Configuration;
 | 
			
		||||
import org.springframework.context.annotation.Profile;
 | 
			
		||||
import org.springframework.jdbc.datasource.DriverManagerDataSource;
 | 
			
		||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
 | 
			
		||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 | 
			
		||||
 | 
			
		||||
@Configuration
 | 
			
		||||
public class JdbcConfig {
 | 
			
		||||
@ -29,7 +27,7 @@ public class JdbcConfig {
 | 
			
		||||
	public DataSource psqlSourceProd(){
 | 
			
		||||
		DriverManagerDataSource source = new DriverManagerDataSource();
 | 
			
		||||
		source.setDriverClassName("org.postgresql.Driver");
 | 
			
		||||
		source.setUrl("jdbc:postgresql://localhost:5432/clyde");
 | 
			
		||||
		source.setUrl("jdbc:postgresql:clyde?socketFactory=org.newsclub.net.unix.AFUNIXSocketFactory$FactoryArg&socketFactoryArg=/var/run/postgresql/.s.PGSQL.5432");
 | 
			
		||||
		source.setUsername("clyde");
 | 
			
		||||
 | 
			
		||||
		return source;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user