mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
fix: Change the source + add input
This commit is contained in:
@@ -635,6 +635,11 @@ mod js_runtime {
|
||||
Ok(ctx.input.clone())
|
||||
}
|
||||
#[op]
|
||||
fn get_input(state: &mut OpState) -> Result<Value, AnyError> {
|
||||
let ctx = state.borrow::<JsContext>();
|
||||
Ok(ctx.input.clone())
|
||||
}
|
||||
#[op]
|
||||
fn set_value(state: &mut OpState, value: Value) -> Result<(), AnyError> {
|
||||
let mut answer = state.borrow::<AnswerState>().0.lock();
|
||||
*answer = value;
|
||||
|
||||
Reference in New Issue
Block a user