@@ -23,22 +23,22 @@ mod get {
2323 ( status = NOT_FOUND , body = inline( ApiError ) ) ,
2424 ) , params(
2525 (
26- "organization" = u32 ,
26+ "organization" = i32 ,
2727 description = "The organization ID" ,
2828 example = 1 ,
2929 ) ,
3030 (
31- "key" = u32 ,
31+ "key" = i32 ,
3232 description = "The api key ID" ,
3333 example = 1 ,
3434 ) ,
3535 ) ) ]
3636 pub async fn route (
3737 state : GetState ,
3838 organization : GetOrganization ,
39- Path ( ( _organization, key) ) : Path < ( u32 , u32 ) > ,
39+ Path ( ( _organization, key) ) : Path < ( i32 , i32 ) > ,
4040 ) -> ( StatusCode , axum:: Json < serde_json:: Value > ) {
41- let key = OrganizationKey :: by_id ( & state. database , key as i32 ) . await ;
41+ let key = OrganizationKey :: by_id ( & state. database , key) . await ;
4242
4343 if let Some ( key) = key {
4444 if key. organization_id != organization. id {
@@ -86,22 +86,22 @@ mod delete {
8686 ( status = NOT_FOUND , body = inline( ApiError ) ) ,
8787 ) , params(
8888 (
89- "organization" = u32 ,
89+ "organization" = i32 ,
9090 description = "The organization ID" ,
9191 example = 1 ,
9292 ) ,
9393 (
94- "key" = u32 ,
94+ "key" = i32 ,
9595 description = "The api key ID" ,
9696 example = 1 ,
9797 ) ,
9898 ) ) ]
9999 pub async fn route (
100100 state : GetState ,
101101 organization : GetOrganization ,
102- Path ( ( _organization, key) ) : Path < ( u32 , u32 ) > ,
102+ Path ( ( _organization, key) ) : Path < ( i32 , i32 ) > ,
103103 ) -> ( StatusCode , axum:: Json < serde_json:: Value > ) {
104- let key = OrganizationKey :: by_id ( & state. database , key as i32 ) . await ;
104+ let key = OrganizationKey :: by_id ( & state. database , key) . await ;
105105
106106 if let Some ( key) = key {
107107 if key. organization_id != organization. id {
0 commit comments