Fixing minor bugs in the Segment analytics flow
This commit is contained in:
parent
426f9b53c1
commit
51d5c93119
|
|
@ -116,7 +116,7 @@ public class ClientUserRepository implements ServerOAuth2AuthorizedClientReposit
|
||||||
newUser.setIsEnabled(true);
|
newUser.setIsEnabled(true);
|
||||||
|
|
||||||
return userService.findByEmail(user.getEmail())
|
return userService.findByEmail(user.getEmail())
|
||||||
.switchIfEmpty(userService.save(newUser)); //In case the user doesnt exist, save the user.
|
.switchIfEmpty(userService.create(newUser)); //In case the user doesnt exist, create and save the user.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ public abstract class BaseService<R extends BaseRepository, T extends BaseDomain
|
||||||
analyticsProperties.put("id", ((BaseDomain) savedObject).getId());
|
analyticsProperties.put("id", ((BaseDomain) savedObject).getId());
|
||||||
analyticsProperties.put("organizationId", user.getOrganizationId());
|
analyticsProperties.put("organizationId", user.getOrganizationId());
|
||||||
analytics.enqueue(
|
analytics.enqueue(
|
||||||
TrackMessage.builder("MONGO_DB_CREATE_" + savedObject.getClass())
|
TrackMessage.builder("MONGO_DB_CREATE_" + savedObject.getClass().getSimpleName().toUpperCase())
|
||||||
.userId(user.getId())
|
.userId(user.getId())
|
||||||
.properties(analyticsProperties)
|
.properties(analyticsProperties)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,4 @@ public interface UserService extends CrudService<User, String> {
|
||||||
|
|
||||||
Mono<User> findByEmail(String email);
|
Mono<User> findByEmail(String email);
|
||||||
|
|
||||||
Mono<User> save(User newUser);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ public class UserServiceImpl extends BaseService<UserRepository, User, String> i
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Mono<User> save(User user) {
|
public Mono<User> create(User user) {
|
||||||
|
|
||||||
Mono<User> savedUserMono = repository.save(user);
|
Mono<User> savedUserMono = repository.save(user);
|
||||||
return savedUserMono
|
return savedUserMono
|
||||||
|
|
|
||||||
|
|
@ -17,3 +17,8 @@ spring.security.oauth2.client.registration.google.client-id=869021686091-9b84bbf
|
||||||
spring.security.oauth2.client.registration.google.client-secret=9dvITt4OayEY1HfeY8bHX74p
|
spring.security.oauth2.client.registration.google.client-secret=9dvITt4OayEY1HfeY8bHX74p
|
||||||
# Accounts from specific domains are allowed to login
|
# Accounts from specific domains are allowed to login
|
||||||
oauth2.allowed-domains=appsmith.com
|
oauth2.allowed-domains=appsmith.com
|
||||||
|
# Segment & Rollbar Properties
|
||||||
|
# These properties are intentionally set to random values so that events are not sent to either of them during local development
|
||||||
|
segment.writeKey=random-value
|
||||||
|
com.rollbar.access-token=random-value
|
||||||
|
com.rollbar.environment=development
|
||||||
|
|
@ -15,3 +15,7 @@ spring.security.oauth2.client.registration.google.client-id=869021686091-9b84bbf
|
||||||
spring.security.oauth2.client.registration.google.client-secret=9dvITt4OayEY1HfeY8bHX74p
|
spring.security.oauth2.client.registration.google.client-secret=9dvITt4OayEY1HfeY8bHX74p
|
||||||
# Accounts from specific domains are allowed to login
|
# Accounts from specific domains are allowed to login
|
||||||
oauth2.allowed-domains=appsmith.com
|
oauth2.allowed-domains=appsmith.com
|
||||||
|
# Segment & Rollbar Properties
|
||||||
|
segment.writeKey=FIRLqUgMYuTlyS6yqOE2hBGZs5umkWhr
|
||||||
|
com.rollbar.access-token=b91c4d5b9cac444088f4db9216ed6f42
|
||||||
|
com.rollbar.environment=development
|
||||||
|
|
@ -11,7 +11,3 @@ spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
|
||||||
spring.jpa.show-sql=true
|
spring.jpa.show-sql=true
|
||||||
# Jackson Properties
|
# Jackson Properties
|
||||||
spring.jackson.default-property-inclusion=non_null
|
spring.jackson.default-property-inclusion=non_null
|
||||||
# Segment Properties
|
|
||||||
segment.writeKey=FIRLqUgMYuTlyS6yqOE2hBGZs5umkWhr
|
|
||||||
com.rollbar.access-token=b91c4d5b9cac444088f4db9216ed6f42
|
|
||||||
com.rollbar.environment=development
|
|
||||||
Loading…
Reference in New Issue
Block a user