CodeBench: Rust golden example — todo-rs.md + kielitietoinen valinta

- Luotu todo-rs.md golden example Rust-referenssitoteutuksesta
- getGoldenForModel() huomioi nyt LANG: todo.md → todo-rs.md Rust-moodissa
- Korjattu golden-compact-rs.md /:id → /{id} bugi
- Juurisyy: malli sai Python golden examplen mutta piti generoida Rustia
This commit is contained in:
2026-04-14 17:37:38 +03:00
parent 088bad7b21
commit 477c21efd0
3 changed files with 547 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ src/lib.rs:
pub fn app(pool: SqlitePool) -> Router
pub async fn init_db(pool: &SqlitePool) → CREATE TABLE IF NOT EXISTS
Routes: .route("/{table}", post(create).get(list))
.route("/{table}/:id", get(get_one).put(update).delete(delete_one))
.route("/{table}/{id}", get(get_one).put(update).delete(delete_one))
src/main.rs:
SqlitePool::connect("sqlite:./app.db"), init_db, bind 0.0.0.0:3000