use worker::*;
#[event(fetch)]
async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> {
console_log!("{} {}", req.method().to_string(), req.path());
let _db_url = env.var("DATABASE_URL").map(|v| v.to_string()).ok();
let _jwt_secret = env.secret("JWT_SECRET").map(|v| v.to_string()).ok();
let _schemas = env
.var("PGRST_DB_SCHEMAS")
.map(|v| v.to_string())
.unwrap_or_else(|_| "public".to_string());
let response_body = serde_json::json!({
"message": "Postrust Worker is running",
"status": "stub",
"note": "Full implementation requires Hyperdrive configuration"
});
Response::from_json(&response_body)
}
#[allow(dead_code)]
async fn process_request(
_req: Request,
_env: &Env,
) -> Result<Response> {
Response::error("Not implemented", 501)
}
#[allow(dead_code)]
async fn get_schema_cache(_env: &Env) -> Result<Option<String>> {
Ok(None)
}