mirror of
https://github.com/lifegpc/pixiv_downloader.git
synced 2026-07-08 01:32:41 +08:00
Update
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use super::PixivDownloaderDbConfig;
|
||||
use super::PixivDownloaderDbError;
|
||||
#[cfg(feature = "server")]
|
||||
use super::User;
|
||||
use super::{Token, User};
|
||||
|
||||
#[async_trait]
|
||||
pub trait PixivDownloaderDb {
|
||||
@@ -24,6 +24,10 @@ pub trait PixivDownloaderDb {
|
||||
password: &[u8],
|
||||
) -> Result<User, PixivDownloaderDbError>;
|
||||
#[cfg(feature = "server")]
|
||||
/// Get token by ID
|
||||
/// * `id` - The token ID
|
||||
async fn get_token(&self, id: u64) -> Result<Option<Token>, PixivDownloaderDbError>;
|
||||
#[cfg(feature = "server")]
|
||||
/// Get a user by ID
|
||||
/// * `id`: The user's ID
|
||||
async fn get_user(&self, id: u64) -> Result<Option<User>, PixivDownloaderDbError>;
|
||||
|
||||
Reference in New Issue
Block a user