Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,10 @@ spotless {
removeUnusedImports()

// Choose one formatters: google or palantir
googleJavaFormat("1.32.0").reflowLongStrings().formatJavadoc(true)

leadingTabsToSpaces(1)
palantirJavaFormat().formatJavadoc(true)
formatAnnotations()
trimTrailingWhitespace()
leadingTabsToSpaces(2)
endWithNewline()

target("src/**/*.java")
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ org.gradle.jvmargs=-Xmx2g -XX:+UseG1GC -Dfile.encoding=UTF-8 --enable-native-acc
# Kotlin incremental compilation
kotlin.incremental=true
kotlin.compiler.execution.strategy=daemon
palantir.native.formatter=true
6 changes: 3 additions & 3 deletions src/main/java/org/nkcoder/UserApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@ConfigurationPropertiesScan
public class UserApplication {

public static void main(String[] args) {
SpringApplication.run(UserApplication.class, args);
}
public static void main(String[] args) {
SpringApplication.run(UserApplication.class, args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/** Command for user registration. */
public record RegisterCommand(String email, String password, String name, AuthRole role) {

public RegisterCommand(String email, String password, String name) {
this(email, password, name, AuthRole.MEMBER);
}
public RegisterCommand(String email, String password, String name) {
this(email, password, name, AuthRole.MEMBER);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
import org.nkcoder.auth.domain.model.TokenPair;

/** Result of authentication operations (register, login, refresh). */
public record AuthResult(
UUID userId, String email, AuthRole role, String accessToken, String refreshToken) {
public record AuthResult(UUID userId, String email, AuthRole role, String accessToken, String refreshToken) {

public static AuthResult of(UUID userId, String email, AuthRole role, TokenPair tokens) {
return new AuthResult(userId, email, role, tokens.accessToken(), tokens.refreshToken());
}
public static AuthResult of(UUID userId, String email, AuthRole role, TokenPair tokens) {
return new AuthResult(userId, email, role, tokens.accessToken(), tokens.refreshToken());
}
}
Loading
Loading