Skip to content

Commit b3f3b86

Browse files
committed
Make fastapi projects app only
1 parent 7640d71 commit b3f3b86

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/project_info.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,7 @@ pub fn get_project_info(use_defaults: bool) -> Result<ProjectInfo> {
723723
None
724724
};
725725

726+
#[cfg(not(feature = "fastapi"))]
726727
let is_application = default_or_prompt_bool(
727728
"Application or Library\n 1 - Application\n 2 - Library\n Choose from [1, 2]"
728729
.to_string(),
@@ -731,6 +732,19 @@ pub fn get_project_info(use_defaults: bool) -> Result<ProjectInfo> {
731732
use_defaults,
732733
)?;
733734

735+
#[cfg(feature = "fastapi")]
736+
let is_application = if is_fastapi_project {
737+
true
738+
} else {
739+
default_or_prompt_bool(
740+
"Application or Library\n 1 - Application\n 2 - Library\n Choose from [1, 2]"
741+
.to_string(),
742+
config.is_application,
743+
true,
744+
use_defaults,
745+
)?
746+
};
747+
734748
#[cfg(feature = "fastapi")]
735749
let database_manager = if is_fastapi_project {
736750
if use_defaults {

0 commit comments

Comments
 (0)