Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ public ResponseEntity<ApiResponder<ServerMetadataObject>> apiIndex(final HttpSer
return ResponseEntity.ok()
.body(ApiResponder.success(
"Hello from Patchats!", new ServerMetadataObject(commitShaProperties.getSha())));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
public class SecurityConfig {
@Bean
SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
return http
.csrf(csrf -> csrf.disable())
.authorizeHttpRequests(auth -> auth
.requestMatchers("/api/**").permitAll()
.anyRequest().permitAll()
)
.build();
return http.csrf(csrf -> csrf.disable())
.authorizeHttpRequests(auth ->
auth.requestMatchers("/api/**").permitAll().anyRequest().permitAll())
.build();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import jakarta.servlet.http.HttpServletRequest;
import org.junit.jupiter.api.Test;
import org.patinanetwork.patchats.common.dto.ApiResponder;
import org.patinanetwork.patchats.utilities.ServerMetadataObject;
import org.patinanetwork.patchats.utilities.sha.CommitShaProperties;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

import jakarta.servlet.http.HttpServletRequest;

public class ApiControllerTest {
private final CommitShaProperties commitShaProperties = mock(CommitShaProperties.class);

Expand Down