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

ambee/giterated

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

Update dependencies

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨931e8eb

⁨giterated-plugins/giterated-backend/src/handlers.rs⁩ - ⁨839⁩ bytes
Raw
1 use std::sync::Arc;
2
3 use giterated_models::{
4 error::{OperationError, RepositoryError, UserError},
5 repository::{Repository, RepositoryInfoRequest, RepositorySummary, RepositoryView},
6 user::{User, UserRepositoriesRequest},
7 };
8 use giterated_plugin::new_stack::{runtime_handler::RuntimeHandle, OperationState, Runtime, State};
9
10 use crate::DatabaseBackend;
11
12 pub async fn user_get_repositories(
13 state: DatabaseBackend,
14 object: User,
15 request: UserRepositoriesRequest,
16 ) -> Result<Vec<RepositorySummary>, OperationError<UserError>> {
17 todo!()
18 }
19
20 pub async fn repository_info(
21 state: DatabaseBackend,
22 object: Repository,
23 request: RepositoryInfoRequest,
24 runtime: RuntimeHandle,
25 State(operation_state): State<OperationState>,
26 ) -> Result<RepositoryView, OperationError<RepositoryError>> {
27 todo!()
28 }
29