better handlign of something.

This commit is contained in:
calcu1on 2024-12-22 21:59:40 -05:00
parent 56cca06199
commit c5e38f29a1

View File

@ -51,6 +51,8 @@ fn handle_connection(mut stream: TcpStream) {
keyfile[0].pop().expect("Not a string").to_string(); keyfile[0].pop().expect("Not a string").to_string();
if api_key == keyfile[0] { if api_key == keyfile[0] {
response = return_response("200"); response = return_response("200");
} else {
response = return_response("404");
} }
} }
stream.write_all(response.as_bytes()).unwrap(); stream.write_all(response.as_bytes()).unwrap();