File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -74,8 +74,14 @@ impl From<but_rebase::commit::AuthorInfo> for AuthorInfo {
74
74
}
75
75
}
76
76
77
- pub fn get_author_info ( _app : & App , project_id : ProjectId ) -> Result < AuthorInfo , Error > {
78
- let repo = but_core:: open_repo ( gitbutler_project:: get ( project_id) ?. path ) ?;
77
+ #[ derive( Deserialize ) ]
78
+ #[ serde( rename_all = "camelCase" ) ]
79
+ pub struct GetAuthorInfoParams {
80
+ pub project_id : ProjectId ,
81
+ }
82
+
83
+ pub fn get_author_info ( _app : & App , params : GetAuthorInfoParams ) -> Result < AuthorInfo , Error > {
84
+ let repo = but_core:: open_repo ( gitbutler_project:: get ( params. project_id ) ?. path ) ?;
79
85
let author = but_rebase:: commit:: get_author_info ( & repo) ?;
80
86
Ok ( author. into ( ) )
81
87
}
Original file line number Diff line number Diff line change 1
- use but_api:: commands:: config:: StoreAuthorGloballyParams ;
1
+ use but_api:: commands:: config:: { GetAuthorInfoParams , StoreAuthorGloballyParams } ;
2
2
use but_api:: error:: Error ;
3
3
use but_api:: { commands:: config, App } ;
4
4
use but_core:: settings:: git:: ui:: GitConfigSettings ;
@@ -46,5 +46,5 @@ pub fn get_author_info(
46
46
app : State < App > ,
47
47
project_id : ProjectId ,
48
48
) -> Result < config:: AuthorInfo , Error > {
49
- config:: get_author_info ( & app, project_id)
49
+ config:: get_author_info ( & app, GetAuthorInfoParams { project_id } )
50
50
}
You can’t perform that action at this time.
0 commit comments