summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-09-24 00:47:22 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-09-24 00:47:22 -0400
commitbe461e9c2a7534134e7f682427f584bc22a558f9 (patch)
treee7d42bfe41e15e3cfc07f0ab553aed42fd72e2b1
parentMerge pull request 'dms are cool' (#1) from dev into main (diff)
downloadxssbook-be461e9c2a7534134e7f682427f584bc22a558f9.tar.gz
xssbook-be461e9c2a7534134e7f682427f584bc22a558f9.tar.bz2
xssbook-be461e9c2a7534134e7f682427f584bc22a558f9.zip
thiccer
Diffstat (limited to '')
-rw-r--r--src/api/chat.rs4
-rw-r--r--src/api/posts.rs8
-rw-r--r--src/database/chat.rs2
-rw-r--r--src/database/comments.rs2
-rw-r--r--src/database/posts.rs2
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)
);