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

ambee/giterated

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

More progress :)

Amber - ⁨1⁩ year ago

parent: tbd commit: ⁨92c3f32

⁨plugins/giterated-backend/src/handlers.rs⁩ - ⁨823⁩ 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::new_stack::{handle::RuntimeHandle, State};
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: RuntimeHandle,
24 State(_operation_state): State<OperationState>,
25 ) -> Result<RepositoryView, OperationError<RepositoryError>> {
26 todo!()
27 }
28