pinakes-core: update remaining modules and tests

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I9e0ff5ea33a5cf697473423e88f167ce6a6a6964
This commit is contained in:
raf 2026-03-08 00:42:29 +03:00
commit 3d9f8933d2
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
44 changed files with 1207 additions and 578 deletions

View file

@ -1,6 +1,17 @@
use uuid::Uuid;
use crate::{error::Result, model::*, storage::DynStorageBackend};
use crate::{
error::Result,
model::{
AuditAction,
Collection,
CollectionKind,
MediaId,
MediaItem,
Pagination,
},
storage::DynStorageBackend,
};
/// Creates a new collection.
///
@ -15,6 +26,10 @@ use crate::{error::Result, model::*, storage::DynStorageBackend};
/// # Returns
///
/// The created collection
///
/// # Errors
///
/// Returns [`crate::error::PinakesError`] if the storage operation fails.
pub async fn create_collection(
storage: &DynStorageBackend,
name: &str,
@ -39,6 +54,10 @@ pub async fn create_collection(
/// # Returns
///
/// `Ok(())` on success
///
/// # Errors
///
/// Returns [`crate::error::PinakesError`] if the storage operation fails.
pub async fn add_member(
storage: &DynStorageBackend,
collection_id: Uuid,
@ -68,6 +87,10 @@ pub async fn add_member(
/// # Returns
///
/// `Ok(())` on success
///
/// # Errors
///
/// Returns [`crate::error::PinakesError`] if the storage operation fails.
pub async fn remove_member(
storage: &DynStorageBackend,
collection_id: Uuid,
@ -98,6 +121,10 @@ pub async fn remove_member(
/// # Returns
///
/// List of media items in the collection
///
/// # Errors
///
/// Returns [`crate::error::PinakesError`] if the storage operation fails.
pub async fn get_members(
storage: &DynStorageBackend,
collection_id: Uuid,