Moved client requests into lib testing.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
This commit is contained in:
@@ -5,7 +5,7 @@ pub enum Action {
|
||||
Addition,
|
||||
Create,
|
||||
Delete,
|
||||
DocumentCreated,
|
||||
DocumentCreated,
|
||||
Error,
|
||||
OnAddition,
|
||||
OnDelete,
|
||||
|
||||
@@ -102,6 +102,7 @@ impl From<UserAction> for MsgAction {
|
||||
fn from(value: UserAction) -> Self {
|
||||
match value {
|
||||
UserAction::Addition(data) => Self::Addition(data),
|
||||
UserAction::Delete(data) => Self::Delete(data),
|
||||
UserAction::Query(data) => Self::Query(data),
|
||||
UserAction::Update(data) => Self::Update(data),
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
use super::{Addition, DocDef, FieldType, Query, Update};
|
||||
use super::{Addition, Delete, DocDef, FieldType, Query, Update};
|
||||
use crate::{message::MessageAction, name::NameType};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum UserAction {
|
||||
Addition(Addition),
|
||||
Delete(Delete),
|
||||
Query(Query),
|
||||
Update(Update),
|
||||
}
|
||||
@@ -14,6 +15,12 @@ impl From<Addition> for UserAction {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Delete> for UserAction {
|
||||
fn from(value: Delete) -> Self {
|
||||
Self::Delete(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Query> for UserAction {
|
||||
fn from(value: Query) -> Self {
|
||||
Self::Query(value)
|
||||
@@ -30,6 +37,7 @@ impl MessageAction for UserAction {
|
||||
fn doc_name(&self) -> &NameType {
|
||||
match self {
|
||||
Self::Addition(data) => data.doc_name(),
|
||||
Self::Delete(data) => data.doc_name(),
|
||||
Self::Query(data) => data.doc_name(),
|
||||
Self::Update(data) => data.doc_name(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user