Corrected external add document issue.
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,6 +5,7 @@ pub enum Action {
|
||||
Addition,
|
||||
Create,
|
||||
Delete,
|
||||
DocumentCreated,
|
||||
Error,
|
||||
OnAddition,
|
||||
OnDelete,
|
||||
@@ -24,6 +25,7 @@ impl From<MsgAction> for Action {
|
||||
MsgAction::Addition(_) => Action::Addition,
|
||||
MsgAction::Create(_) => Action::Create,
|
||||
MsgAction::Delete(_) => Action::Delete,
|
||||
MsgAction::DocumentCreated => Action::DocumentCreated,
|
||||
MsgAction::Error(_) => Action::Error,
|
||||
MsgAction::OnAddition(_) => Action::OnAddition,
|
||||
MsgAction::OnDelete(_) => Action::OnDelete,
|
||||
|
||||
@@ -8,6 +8,7 @@ pub enum MsgAction {
|
||||
Addition(Addition),
|
||||
Create(DocDef),
|
||||
Delete(Delete),
|
||||
DocumentCreated,
|
||||
Error(MTTError),
|
||||
OnAddition(Records),
|
||||
OnDelete(Records),
|
||||
@@ -27,6 +28,7 @@ impl MessageAction for MsgAction {
|
||||
Self::Addition(data) => data.doc_name(),
|
||||
Self::Create(data) => data.doc_name(),
|
||||
Self::Delete(data) => data.doc_name(),
|
||||
Self::DocumentCreated => &NameType::None,
|
||||
Self::Error(data) => data.doc_name(),
|
||||
Self::OnAddition(data) => data.doc_name(),
|
||||
Self::OnDelete(data) => data.doc_name(),
|
||||
@@ -100,7 +102,6 @@ impl From<UserAction> for MsgAction {
|
||||
fn from(value: UserAction) -> Self {
|
||||
match value {
|
||||
UserAction::Addition(data) => Self::Addition(data),
|
||||
UserAction::CreateDocument(data) => Self::Create(data),
|
||||
UserAction::Query(data) => Self::Query(data),
|
||||
UserAction::Update(data) => Self::Update(data),
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ use crate::{message::MessageAction, name::NameType};
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum UserAction {
|
||||
Addition(Addition),
|
||||
CreateDocument(DocDef),
|
||||
Query(Query),
|
||||
Update(Update),
|
||||
}
|
||||
@@ -15,12 +14,6 @@ impl From<Addition> for UserAction {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<DocDef> for UserAction {
|
||||
fn from(value: DocDef) -> Self {
|
||||
Self::CreateDocument(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Query> for UserAction {
|
||||
fn from(value: Query) -> Self {
|
||||
Self::Query(value)
|
||||
@@ -37,7 +30,6 @@ impl MessageAction for UserAction {
|
||||
fn doc_name(&self) -> &NameType {
|
||||
match self {
|
||||
Self::Addition(data) => data.doc_name(),
|
||||
Self::CreateDocument(data) => data.doc_name(),
|
||||
Self::Query(data) => data.doc_name(),
|
||||
Self::Update(data) => data.doc_name(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user