From be461e9c2a7534134e7f682427f584bc22a558f9 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Sun, 24 Sep 2023 00:47:22 -0400 Subject: [PATCH] thiccer --- src/api/chat.rs | 4 ++-- src/api/posts.rs | 8 ++++---- src/database/chat.rs | 2 +- src/database/comments.rs | 2 +- src/database/posts.rs | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/api/chat.rs b/src/api/chat.rs index 02bdfbd..0871d6c 100644 --- a/src/api/chat.rs +++ b/src/api/chat.rs @@ -307,8 +307,8 @@ impl Check for SendMessageRequest { Self::assert_length( &self.content, 1, - 500, - "Messages must be between 1-500 length" + 5000, + "Messages must be between 1-5000 length" )?; Ok(()) } diff --git a/src/api/posts.rs b/src/api/posts.rs index bd7e665..6516d92 100644 --- a/src/api/posts.rs +++ b/src/api/posts.rs @@ -46,8 +46,8 @@ impl Check for PostCreateRequest { Self::assert_length( &self.content, 1, - 500, - "Comments must be between 1-500 characters long", + 5000, + "Posts must be between 1-5000 characters long", )?; Ok(()) } @@ -246,8 +246,8 @@ impl Check for PostCommentRequest { Self::assert_length( &self.content, 1, - 255, - "Comments must be between 1-255 characters long", + 2000, + "Comments must be between 1-2000 characters long", )?; Ok(()) } diff --git a/src/database/chat.rs b/src/database/chat.rs index 99ec86c..87b7154 100644 --- a/src/database/chat.rs +++ b/src/database/chat.rs @@ -35,7 +35,7 @@ impl Database { user_id INTEGER NOT NULL, room_id INTEGER NOT NULL, date INTEGER NOT NULL, - content VARCHAR(500) NOT NULL, + content VARCHAR(5000) NOT NULL, FOREIGN KEY(user_id) REFERENCES users(user_id), FOREIGN KEY(room_id) REFERENCES chat_rooms(room_id) ); diff --git a/src/database/comments.rs b/src/database/comments.rs index 5a1b39d..6faebfb 100644 --- a/src/database/comments.rs +++ b/src/database/comments.rs @@ -15,7 +15,7 @@ impl Database { user_id INTEGER NOT NULL, post_id INTEGER NOT NULL, date INTEGER NOT NULL, - content VARCHAR(255) NOT NULL, + content VARCHAR(2000) NOT NULL, FOREIGN KEY(user_id) REFERENCES users(user_id), FOREIGN KEY(post_id) REFERENCES posts(post_id) ); diff --git a/src/database/posts.rs b/src/database/posts.rs index fa0fd3c..832fa7c 100644 --- a/src/database/posts.rs +++ b/src/database/posts.rs @@ -13,7 +13,7 @@ impl Database { CREATE TABLE IF NOT EXISTS posts ( post_id INTEGER PRIMARY KEY AUTOINCREMENT, user_id INTEGER NOT NULL, - content VARCHAR(500) NOT NULL, + content VARCHAR(5000) NOT NULL, date INTEGER NOT NULL, FOREIGN KEY(user_id) REFERENCES users(user_id) );