Skip to content
Closed
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
7 changes: 6 additions & 1 deletion linktreeclone-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.5</version>
<version>3.3.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>br.com</groupId>
Expand Down Expand Up @@ -93,6 +93,11 @@
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.5.0</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
"/auth/login",
"/status"
).permitAll()
.requestMatchers("/swagger-ui.html").permitAll()
.requestMatchers("/swagger-ui/**").permitAll()
.requestMatchers("/v3/api-docs/**").permitAll()
.requestMatchers(HttpMethod.GET, "/{username}").permitAll()
.anyRequest().authenticated()
)
Expand Down
16 changes: 11 additions & 5 deletions linktreeclone-frontend/src/features/home/pages/HomePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const HomePage = () => {
};

getStatus();
}, []);
}, []);

const isApiReady = apiStatus === 'ok';

Expand All @@ -40,15 +40,15 @@ const HomePage = () => {
</p>

<div className="home-cta-container">
<Link
to={isApiReady ? "/signup" : "#"}
<Link
to={isApiReady ? "/signup" : "#"}
className={`home-cta-button primary ${!isApiReady && 'disabled'}`}
style={{ pointerEvents: !isApiReady ? 'none' : 'auto' }} // Impede o clique
>
Criar minha página
</Link>
<Link
to={isApiReady ? "/login" : "#"}
<Link
to={isApiReady ? "/login" : "#"}
className={`home-cta-button secondary ${!isApiReady && 'disabled'}`}
style={{ pointerEvents: !isApiReady ? 'none' : 'auto' }}
>
Expand Down Expand Up @@ -76,6 +76,12 @@ const HomePage = () => {
GitHub
</a>
</p>
<p>
Backend (API): {' '}
<a href="https://linktree-clone-api-faw777jkuq-rj.a.run.app/swagger-ui/index.html" target="_blank" rel="noopener noreferrer">
Swagger UI
</a>
</p>
</footer>
</div>
);
Expand Down