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);
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ public abstract class BaseService<R extends BaseRepository, T extends BaseDomain
|
|||
analyticsProperties.put("id", ((BaseDomain) savedObject).getId());
|
||||
analyticsProperties.put("organizationId", user.getOrganizationId());
|
||||
analytics.enqueue(
|
||||
TrackMessage.builder("MONGO_DB_CREATE_" + savedObject.getClass())
|
||||
TrackMessage.builder("MONGO_DB_CREATE_" + savedObject.getClass().getSimpleName().toUpperCase())
|
||||
.userId(user.getId())
|
||||
.properties(analyticsProperties)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,4 @@ public interface UserService extends CrudService<User, String> {
|
|||
|
||||
Mono<User> findByEmail(String email);
|
||||
|
||||
Mono<User> save(User newUser);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class UserServiceImpl extends BaseService<UserRepository, User, String> i
|
|||
}
|
||||
|
||||
@Override
|
||||
public Mono<User> save(User user) {
|
||||
public Mono<User> create(User user) {
|
||||
|
||||
Mono<User> savedUserMono = repository.save(user);
|
||||
return savedUserMono
|
||||
|
|
|
|||
|
|
@ -16,4 +16,9 @@ jdbc.postgres.password=root
|
|||
spring.security.oauth2.client.registration.google.client-id=869021686091-9b84bbf7ea683t1aaefqnmefcnmk6fq6.apps.googleusercontent.com
|
||||
spring.security.oauth2.client.registration.google.client-secret=9dvITt4OayEY1HfeY8bHX74p
|
||||
# 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
|
||||
|
|
@ -14,4 +14,8 @@ jdbc.postgres.password=09275163cd7e737baf4c210b5e8db8ed88ddb7a0ee9acc82416fd7534
|
|||
spring.security.oauth2.client.registration.google.client-id=869021686091-9b84bbf7ea683t1aaefqnmefcnmk6fq6.apps.googleusercontent.com
|
||||
spring.security.oauth2.client.registration.google.client-secret=9dvITt4OayEY1HfeY8bHX74p
|
||||
# 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
|
||||
# Jackson Properties
|
||||
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