Merge pull request #5 from calcu1on/better-404

better handlign of something.
This commit is contained in:
calcu1on 2024-12-22 21:57:49 -05:00 committed by GitHub
commit d1ac420503
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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