JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Wow!

Amber - ⁨1⁩ year ago

parent: tbd commit: ⁨6530104

⁨plugins/giterated-backend/src/handlers.rs⁩ - ⁨829⁩ bytes
Raw
1 use giterated_models::{
2 error::{OperationError, RepositoryError, UserError},
3 operation::OperationState,
4 repository::{Repository, RepositoryInfoRequest, RepositorySummary, RepositoryView},
5 user::{User, UserRepositoriesRequest},
6 };
7 use giterated_plugin::{RuntimeState, StateExtractor};
8
9 use crate::DatabaseBackend;
10
11 pub async fn user_get_repositories(
12 _state: DatabaseBackend,
13 _object: User,
14 _request: UserRepositoriesRequest,
15 ) -> Result<Vec<RepositorySummary>, OperationError<UserError>> {
16 todo!()
17 }
18
19 pub async fn repository_info(
20 _state: DatabaseBackend,
21 _object: Repository,
22 _request: RepositoryInfoRequest,
23 _runtime: RuntimeState,
24 StateExtractor(_operation_state): StateExtractor<OperationState>,
25 ) -> Result<RepositoryView, OperationError<RepositoryError>> {
26 todo!()
27 }
28