File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ use axum_extra::{
25
25
TypedHeader ,
26
26
} ;
27
27
use chrono:: { DateTime , Utc } ;
28
+ use http:: StatusCode ;
28
29
use semver:: Version ;
29
30
use serde:: Serialize ;
30
31
use serde_json:: json;
@@ -196,7 +197,7 @@ pub(crate) async fn build_trigger_rebuild_handler(
196
197
. await
197
198
. map_err ( |e| JsonAxumNope ( e. into ( ) ) ) ?;
198
199
199
- Ok ( Json ( json ! ( { } ) ) )
200
+ Ok ( ( StatusCode :: CREATED , Json ( json ! ( { } ) ) ) )
200
201
}
201
202
202
203
async fn get_builds (
@@ -442,7 +443,7 @@ mod tests {
442
443
. post ( "/crate/foo/0.1.0/rebuild" )
443
444
. bearer_auth ( correct_token)
444
445
. send ( ) ?;
445
- assert_eq ! ( response. status( ) , StatusCode :: OK ) ;
446
+ assert_eq ! ( response. status( ) , StatusCode :: CREATED ) ;
446
447
let text = response. text ( ) ?;
447
448
let json: serde_json:: Value = serde_json:: from_str ( & text) ?;
448
449
assert_eq ! ( json, serde_json:: json!( { } ) ) ;
You can’t perform that action at this time.
0 commit comments