-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pass profile by name instead of config struct
this is easier to test Signed-off-by: Robert Detjens <[email protected]>
- Loading branch information
1 parent
98bf272
commit 8b7ea27
Showing
5 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
use anyhow::{Error, Result}; | ||
|
||
use crate::configparser::{config, CONFIG}; | ||
use crate::configparser::{get_config, get_profile_config}; | ||
|
||
/// frontend dashbard access checks | ||
pub fn check(profile: &config::ProfileConfig) -> Result<()> { | ||
pub fn check(profile_name: &str) -> Result<()> { | ||
let profile = get_profile_config(profile_name)?; | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
use anyhow::{Error, Result}; | ||
|
||
use crate::configparser::{config, CONFIG}; | ||
use crate::configparser::{get_config, get_profile_config}; | ||
|
||
/// s3 bucket access checks | ||
pub fn check(profile: &config::ProfileConfig) -> Result<()> { | ||
pub fn check(profile_name: &str) -> Result<()> { | ||
let profile = get_profile_config(profile_name)?; | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters