-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embed Studio artifacts into fpx cli #48
Conversation
) -> axum::Router { | ||
let api_router = api_router(base_url, events, store, inspector_service); | ||
axum::Router::new() | ||
.nest("/api/", api_router) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now split into its own router, since that way we can have separate fallback handlers. The only downside is that the routes in the inner router do not have the /api/
prefix.
@@ -42,7 +43,19 @@ impl FromRef<ApiState> for InspectorService { | |||
} | |||
|
|||
/// Create a API and expose it through a axum router. | |||
pub async fn create_api( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this was async, so removed it
fpx/src/data.rs
Outdated
@@ -126,6 +126,7 @@ pub enum DbError { | |||
InternalError(#[from] libsql::Error), | |||
} | |||
|
|||
#[allow(dead_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to suppress any compile warnings / clippies
When retrieving a file from a dir_entry, use the _full_ path, not just the name within the dir_entry. Not sure if this is a bug or not
Enabling this requires that Studio is compiled. Otherwise compilation will fail.
This currently requires a feature flag to actually embed the Studio. If this is enabled, then it requires that the studio is build. To make it easier to work with fpx, I have made this an optin, for mostly the CI build.
Resolves: FP-3793