Compare commits

...

4 commits
dev ... main

Author SHA1 Message Date
5131d6e6c5 Update 'README.md' 2023-10-31 13:43:20 +00:00
c263cfabf8
change watermark 2023-10-31 09:40:04 -04:00
be461e9c2a
thiccer 2023-09-24 00:47:22 -04:00
edbbdf72c7 Merge pull request 'dms are cool' (#1) from dev into main
Reviewed-on: https://g.tylerm.dev/tylerm/xssbook/pulls/1
2023-08-22 04:16:31 +00:00
7 changed files with 12 additions and 12 deletions

View file

@ -9,7 +9,7 @@ now with xssbook you can run as much stallman disapprovement as you want
- api calls dont care what you send them as long as they are valid strings - api calls dont care what you send them as long as they are valid strings
- /console page to see everyones amazing api calls - /console page to see everyones amazing api calls
- /admin page for adnim things - /admin page for adnim things
- /api for api documentation - /docs for api documentation
**installation** **installation**

View file

@ -176,7 +176,7 @@
</div> </div>
</div> </div>
<footer> <footer>
Tyler Murphy © 2023 | tylerm.dev Freya Murphy © 2023 | freya.cat
</footer> </footer>
</body> </body>
</html> </html>

View file

@ -307,8 +307,8 @@ impl Check for SendMessageRequest {
Self::assert_length( Self::assert_length(
&self.content, &self.content,
1, 1,
500, 5000,
"Messages must be between 1-500 length" "Messages must be between 1-5000 length"
)?; )?;
Ok(()) Ok(())
} }

View file

@ -46,8 +46,8 @@ impl Check for PostCreateRequest {
Self::assert_length( Self::assert_length(
&self.content, &self.content,
1, 1,
500, 5000,
"Comments must be between 1-500 characters long", "Posts must be between 1-5000 characters long",
)?; )?;
Ok(()) Ok(())
} }
@ -246,8 +246,8 @@ impl Check for PostCommentRequest {
Self::assert_length( Self::assert_length(
&self.content, &self.content,
1, 1,
255, 2000,
"Comments must be between 1-255 characters long", "Comments must be between 1-2000 characters long",
)?; )?;
Ok(()) Ok(())
} }

View file

@ -35,7 +35,7 @@ impl Database {
user_id INTEGER NOT NULL, user_id INTEGER NOT NULL,
room_id INTEGER NOT NULL, room_id INTEGER NOT NULL,
date 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(user_id) REFERENCES users(user_id),
FOREIGN KEY(room_id) REFERENCES chat_rooms(room_id) FOREIGN KEY(room_id) REFERENCES chat_rooms(room_id)
); );

View file

@ -15,7 +15,7 @@ impl Database {
user_id INTEGER NOT NULL, user_id INTEGER NOT NULL,
post_id INTEGER NOT NULL, post_id INTEGER NOT NULL,
date 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(user_id) REFERENCES users(user_id),
FOREIGN KEY(post_id) REFERENCES posts(post_id) FOREIGN KEY(post_id) REFERENCES posts(post_id)
); );

View file

@ -13,7 +13,7 @@ impl Database {
CREATE TABLE IF NOT EXISTS posts ( CREATE TABLE IF NOT EXISTS posts (
post_id INTEGER PRIMARY KEY AUTOINCREMENT, post_id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL, user_id INTEGER NOT NULL,
content VARCHAR(500) NOT NULL, content VARCHAR(5000) NOT NULL,
date INTEGER NOT NULL, date INTEGER NOT NULL,
FOREIGN KEY(user_id) REFERENCES users(user_id) FOREIGN KEY(user_id) REFERENCES users(user_id)
); );