From 8dbdcf08d6447bb02e481f503cbb57c178a2b5ca Mon Sep 17 00:00:00 2001 From: 0xZensh Date: Sun, 26 Nov 2023 20:52:48 +0800 Subject: [PATCH] chore: update context max length --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/api/collection.rs | 2 +- src/api/message.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a4529ef..57ef095 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3097,7 +3097,7 @@ dependencies = [ [[package]] name = "writing" -version = "1.3.15" +version = "1.3.16" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 5139454..457f3f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "writing" -version = "1.3.15" +version = "1.3.16" edition = "2021" rust-version = "1.64" description = "" diff --git a/src/api/collection.rs b/src/api/collection.rs index da4bc59..1f4ab67 100644 --- a/src/api/collection.rs +++ b/src/api/collection.rs @@ -25,7 +25,7 @@ use super::{ pub struct CreateCollectionInput { pub gid: PackObject, pub language: PackObject, - #[validate(length(min = 0, max = 1024))] + #[validate(length(min = 0, max = 4096))] pub context: String, pub info: CollectionInfoInput, #[validate(url)] diff --git a/src/api/message.rs b/src/api/message.rs index b40ce06..773ec3b 100644 --- a/src/api/message.rs +++ b/src/api/message.rs @@ -19,7 +19,7 @@ use crate::db; pub struct CreateMessageInput { pub attach_to: PackObject, pub kind: String, - #[validate(length(min = 0, max = 512))] + #[validate(length(min = 0, max = 4096))] pub context: String, pub language: PackObject, #[validate(custom = "validate_message")] @@ -166,7 +166,7 @@ pub struct UpdateMessageInput { #[validate(range(min = 1, max = 32767))] pub version: i16, pub gid: PackObject, - #[validate(length(min = 0, max = 512))] + #[validate(length(min = 0, max = 4096))] pub context: Option, pub language: Option>, #[validate(custom = "validate_message")]