Rename repository respon
parent: tbd commit: 26b3ae1
Showing 3 changed files with 9 insertions and 9 deletions
src/backend/git.rs
@@ -14,7 +14,7 @@ use crate::model::repository::{ | ||
14 | 14 | use crate::model::user::User; |
15 | 15 | use crate::{ |
16 | 16 | messages::repository::{ |
17 | CreateRepositoryRequest, CreateRepositoryResponse, RepositoryFileInspectRequest, | |
17 | CreateRepositoryRequest, RepositoryCreateResponse, RepositoryFileInspectRequest, | |
18 | 18 | RepositoryFileInspectionResponse, RepositoryInfoRequest, RepositoryIssueLabelsRequest, |
19 | 19 | RepositoryIssueLabelsResponse, RepositoryIssuesCountRequest, RepositoryIssuesCountResponse, |
20 | 20 | RepositoryIssuesRequest, RepositoryIssuesResponse, |
@@ -212,7 +212,7 @@ impl RepositoryBackend for GitBackend { | ||
212 | 212 | &mut self, |
213 | 213 | _user: &User, |
214 | 214 | request: &CreateRepositoryRequest, |
215 | ) -> Result<CreateRepositoryResponse, Error> { | |
215 | ) -> Result<RepositoryCreateResponse, Error> { | |
216 | 216 | // Check if repository already exists in the database |
217 | 217 | if let Ok(repository) = self |
218 | 218 | .find_by_owner_user_name(&request.owner, &request.name) |
@@ -224,7 +224,7 @@ impl RepositoryBackend for GitBackend { | ||
224 | 224 | }; |
225 | 225 | error!("{:?}", err); |
226 | 226 | |
227 | return Ok(CreateRepositoryResponse::Failed); | |
227 | return Ok(RepositoryCreateResponse::Failed); | |
228 | 228 | } |
229 | 229 | |
230 | 230 | // Insert the repository into the database |
@@ -238,7 +238,7 @@ impl RepositoryBackend for GitBackend { | ||
238 | 238 | let err = GitBackendError::FailedInsertingIntoDatabase(err); |
239 | 239 | error!("Failed inserting into the database! {:?}", err); |
240 | 240 | |
241 | return Ok(CreateRepositoryResponse::Failed); | |
241 | return Ok(RepositoryCreateResponse::Failed); | |
242 | 242 | } |
243 | 243 | }; |
244 | 244 | |
@@ -255,7 +255,7 @@ impl RepositoryBackend for GitBackend { | ||
255 | 255 | "Created new repository with the name {}/{}/{}", |
256 | 256 | request.owner.instance.url, request.owner.username, request.name |
257 | 257 | ); |
258 | Ok(CreateRepositoryResponse::Created) | |
258 | Ok(RepositoryCreateResponse::Created) | |
259 | 259 | } |
260 | 260 | Err(err) => { |
261 | 261 | let err = GitBackendError::FailedCreatingRepository(err); |
@@ -270,7 +270,7 @@ impl RepositoryBackend for GitBackend { | ||
270 | 270 | } |
271 | 271 | |
272 | 272 | // ??? |
273 | Ok(CreateRepositoryResponse::Failed) | |
273 | Ok(RepositoryCreateResponse::Failed) | |
274 | 274 | //Err(Box::new(err)) |
275 | 275 | } |
276 | 276 | } |
src/backend/mod.rs
@@ -13,7 +13,7 @@ use crate::{ | ||
13 | 13 | RegisterAccountResponse, |
14 | 14 | }, |
15 | 15 | repository::{ |
16 | CreateRepositoryRequest, CreateRepositoryResponse, RepositoryFileInspectRequest, | |
16 | CreateRepositoryRequest, RepositoryCreateResponse, RepositoryFileInspectRequest, | |
17 | 17 | RepositoryFileInspectionResponse, RepositoryInfoRequest, RepositoryIssueLabelsRequest, |
18 | 18 | RepositoryIssueLabelsResponse, RepositoryIssuesCountRequest, |
19 | 19 | RepositoryIssuesCountResponse, RepositoryIssuesRequest, RepositoryIssuesResponse, |
@@ -35,7 +35,7 @@ pub trait RepositoryBackend: IssuesBackend { | ||
35 | 35 | &mut self, |
36 | 36 | user: &User, |
37 | 37 | request: &CreateRepositoryRequest, |
38 | ) -> Result<CreateRepositoryResponse, Error>; | |
38 | ) -> Result<RepositoryCreateResponse, Error>; | |
39 | 39 | async fn repository_info( |
40 | 40 | &mut self, |
41 | 41 | requester: Option<&User>, |