backend/src/main/java/ch/fhnw/speech_collection_app/features/base/user/CustomUserDetailsService.java
private void checkDialect(User user) {
        if (user.getDialectId() == null) {
            var id = dslContext.selectFrom(DIALECT).where(DIALECT.COUNTY_ID.eq(zipCodes.get(user.getZipCode())))
                    .fetchOptional(DIALECT.ID).orElse(1L);
            user.setDialectId(id);
        }
    }
/**
     * check if the dialect is set if not it is selected using the zip code
     */
check if the dialect is set if not it is selected using the zip code
check if the dialect is set if not it is selected using the zip code
private void checkDialect(User user) {
        if (user.getDialectId() == null) {
            var id = dslContext.selectFrom(DIALECT).where(DIALECT.COUNTY_ID.eq(zipCodes.get(user.getZipCode())))
                    .fetchOptional(DIALECT.ID).orElse(1L);
            user.setDialectId(id);
        }
    }
private void checkDialect ( User user ) { if ( user . getDialectId ( ) == null ) { var id = dslContext . selectFrom ( DIALECT ) . where ( DIALECT . COUNTY_ID . eq ( zipCodes . get ( user . getZipCode ( ) ) ) ) . fetchOptional ( DIALECT . ID ) . orElse ( 1L ) ; user . setDialectId ( id ) ; } }
check if the dialect is set if not it is selected using the zip code
check if the dialect is set if not it is selected using the zip code