AntonioMrtz / SpotifyElectron

Spotify Electron is a cross-platform music streaming desktop app made with Electron-React frontend and Python-FastAPI-MongoDB Backend. The goal is to reproduce the original Spotify functionality while adding new ones like uploading songs
https://antoniomrtz.github.io/SpotifyElectron_Web/
Other
45 stars 23 forks source link

Improve health endpoint with missing required conditions #283

Open AntonioMrtz opened 2 weeks ago

AntonioMrtz commented 2 weeks ago

Description

Improve health endpoint checks with initializations done in lifespan_handler

Context

There are required conditions for the app to work properly that are not checked in health endpoint

How to do it

Add to health endpoint checks that validate the following initialization in lifespan_handler method at __main__

AuthConfig.init_auth_config(
    access_token_expire_minutes=AppAuthConfig.ACCESS_TOKEN_EXPIRE_MINUTES,
    verification_algorithm=AppAuthConfig.VERTIFICATION_ALGORITHM,
    days_to_expire_cookie=AppAuthConfig.DAYS_TO_EXPIRE_COOKIE,
)

DatabaseConnectionManager.init_database_connection(
    environment=environment, connection_uri=connection_uri
)
SongServiceProvider.init_service()

Testing


🖐️ Learn how to CONTRIBUTE, all help is welcomed :)

📚 Check out the project documentation for more info

⭐ Help this project grow by giving it a star if you like it!

😵 Trello links are used for traceability, do not ask to join the board before leaving a comment in the related issue

AntonioMrtz commented 2 weeks ago

Improve health endpoint with missing required conditions

RobyBen commented 1 day ago

I'll try to solve this issue