Refactored session id.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 3s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 3s
This commit is contained in:
@@ -99,6 +99,7 @@ impl From<Update> for MsgAction {
|
||||
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),
|
||||
}
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
use super::{DocDef, FieldType, Query};
|
||||
use super::{Addition, DocDef, FieldType, Query};
|
||||
use crate::{message::MessageAction, name::NameType};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum UserAction {
|
||||
Addition(Addition),
|
||||
CreateDocument(DocDef),
|
||||
Query(Query),
|
||||
}
|
||||
|
||||
impl From<Addition> for UserAction {
|
||||
fn from(value: Addition) -> Self {
|
||||
Self::Addition(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<DocDef> for UserAction {
|
||||
fn from(value: DocDef) -> Self {
|
||||
Self::CreateDocument(value)
|
||||
@@ -22,6 +29,7 @@ impl From<Query> for UserAction {
|
||||
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(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user