Browse Source

Merge pull request #15 from vran-dev/feature/vran

fix: username is wrong after login
master
vran 3 years ago
committed by GitHub
parent
commit
133b9476e5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      api/src/main/java/com/databasir/api/config/security/DatabasirAuthenticationSuccessHandler.java
  2. 2
      api/src/main/resources/application-local.properties

2
api/src/main/java/com/databasir/api/config/security/DatabasirAuthenticationSuccessHandler.java

@ -48,7 +48,7 @@ public class DatabasirAuthenticationSuccessHandler implements AuthenticationSucc
data.setId(user.getUserPojo().getId());
data.setNickname(user.getUserPojo().getNickname());
data.setEmail(user.getUserPojo().getEmail());
data.setUsername(user.getUsername());
data.setUsername(user.getUserPojo().getUsername());
LoginKeyResponse loginKey = loginService.generate(user.getUserPojo().getId());
data.setAccessToken(loginKey.getAccessToken());

2
api/src/main/resources/application-local.properties

@ -6,6 +6,6 @@ spring.datasource.password=123456
spring.datasource.url=jdbc:mysql://localhost:3306/databasir
spring.jooq.sql-dialect=mysql
spring.flyway.enabled=false
spring.flyway.enabled=true
spring.flyway.baseline-on-migrate=true
spring.flyway.locations=classpath:db/migration
Loading…
Cancel
Save