Add TODOs for planning

This commit is contained in:
2024-12-23 14:12:48 -06:00
parent b7b010ba3e
commit 9a54104bdd
4 changed files with 8 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ RUN apt update && apt install -y g++-mingw-w64-x86-64
RUN rustup target add x86_64-pc-windows-gnu RUN rustup target add x86_64-pc-windows-gnu
RUN rustup target add x86_64-unknown-linux-gnu RUN rustup target add x86_64-unknown-linux-gnu
# TODO: Add support for macOS
# RUN rustup target add x86_64-apple-darwin # RUN rustup target add x86_64-apple-darwin
COPY ./demo ./ COPY ./demo ./

View File

@@ -26,6 +26,7 @@ fn main() {
return; return;
} }
// TODO: Use token to make request
// Check the hash of the value // Check the hash of the value
let value_hash = sha2::Sha256::digest(key_data.value.as_bytes()); let value_hash = sha2::Sha256::digest(key_data.value.as_bytes());
let hash_match = hex::encode(value_hash) == key_data.value_hash; let hash_match = hex::encode(value_hash) == key_data.value_hash;

View File

@@ -46,6 +46,7 @@ const StatefulDemo = ({ class: className }: StatefulDemoProps) => {
socket.close(); socket.close();
}; };
}, []); }, []);
// TODO: Toasts
const randomBits = (bits: number) => const randomBits = (bits: number) =>
Math.floor(Math.random() * 2 ** bits) Math.floor(Math.random() * 2 ** bits)
.toString(16) .toString(16)

View File

@@ -204,6 +204,11 @@ async fn main() {
let static_dir = StaticDir::new(["./public"]).defaults("index.html"); let static_dir = StaticDir::new(["./public"]).defaults("index.html");
// TODO: Move handlers to a separate file
// TODO: Improved Token Generation
// TODO: Advanded HMAC Verification
// TODO: Session Purging
let router = Router::new() let router = Router::new()
.hoop(CatchPanic::new()) .hoop(CatchPanic::new())
.hoop(cors) .hoop(cors)