Changeset 6221ab6 for springapp/src/main


Ignore:
Timestamp:
08/20/22 21:12:04 (2 years ago)
Author:
unknown <mlviktor23@…>
Branches:
main
Children:
2fcbde4
Parents:
702ca77
Message:

finished add post func. in react, fixed user dashboard details not loading upon login redirect

Location:
springapp/src/main
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • springapp/src/main/java/mk/profesori/springapp/Controller/PublicController.java

    r702ca77 r6221ab6  
    2323@RestController
    2424@RequestMapping("/public")
    25 @CrossOrigin(origins = { "http://192.168.0.17:3000", "http://192.168.0.24:3000" })
     25@CrossOrigin(origins = { "http://192.168.0.19:3000", "http://192.168.0.24:3000" })
    2626public class PublicController {
    2727
  • springapp/src/main/java/mk/profesori/springapp/Controller/SecureController.java

    r702ca77 r6221ab6  
    2525@RestController
    2626@RequestMapping("/secure")
    27 @CrossOrigin(origins = { "http://192.168.0.17:3000", "http://192.168.0.24:3000" })
     27@CrossOrigin(origins = { "http://192.168.0.19:3000", "http://192.168.0.24:3000" })
    2828public class SecureController {
    2929
  • springapp/src/main/java/mk/profesori/springapp/Security/SecurityConfiguration.java

    r702ca77 r6221ab6  
    3737            @Override
    3838            public void addCorsMappings(CorsRegistry registry) {
    39                 registry.addMapping("/**").allowedOrigins("http://192.168.0.17:3000", "http://192.168.0.24:3000")
     39                registry.addMapping("/**").allowedOrigins("http://192.168.0.19:3000", "http://192.168.0.24:3000")
    4040                        .allowCredentials(true);
    4141            }
  • springapp/src/main/java/mk/profesori/springapp/Service/RegistrationService.java

    r702ca77 r6221ab6  
    4545                String tokenToResend = customUserDetailsService
    4646                        .createToken(userRepository.findByEmail(request.getEmail()).get());
    47                 String link = "http://192.168.0.17:8080/registration/confirm?token=" + tokenToResend;
     47                String link = "http://192.168.0.19:8080/registration/confirm?token=" + tokenToResend;
    4848                emailSender.send(request.getEmail(), emailSender.buildEmail(request.getUsername(), link));
    4949                return tokenToResend;
     
    6666                        UserRole.REGULAR));
    6767
    68         String link = "http://192.168.0.17:8080/registration/confirm?token=" + token;
     68        String link = "http://192.168.0.19:8080/registration/confirm?token=" + token;
    6969
    7070        emailSender.send(request.getEmail(), emailSender.buildEmail(request.getUsername(), link));
  • springapp/src/main/resources/application.properties

    r702ca77 r6221ab6  
    77spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
    88spring.jpa.properties.hibernate.format_sql=true
    9 server.address=192.168.0.17
     9server.address=192.168.0.19
    1010spring.mail.host=192.168.0.24
    1111spring.mail.username=mailuser
Note: See TracChangeset for help on using the changeset viewer.