mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
16 lines
564 B
Rust
16 lines
564 B
Rust
use polariton_server::operations::SimpleFunc;
|
|
use polariton::{operation::{Arr, ParameterTable, Typed}, serdes::TypePrefix};
|
|
|
|
const PARAM_KEY: u8 = 216;
|
|
|
|
pub(super) fn cube_awards_provider() -> SimpleFunc<206, crate::UserTy, impl (Fn(ParameterTable, &crate::UserTy) -> Result<ParameterTable, i16>) + Sync + Sync> {
|
|
SimpleFunc::new(|params, _| {
|
|
let mut params = params.to_dict();
|
|
params.insert(PARAM_KEY, Typed::Arr(Arr {
|
|
ty: TypePrefix::Str, // str
|
|
items: Vec::default(),
|
|
}));
|
|
Ok(params.into())
|
|
})
|
|
}
|