Closed akelyasir closed 5 months ago
Hi @akelyasir, I will fix this bug. I'm currently moving my house. Sorry for this.
Hİ @victorteokw
I hope your new home will be beautiful. I found a solution for this problem, but I don't know if it is the right solution.
I added the following code to this file /src/entities/helpers/interface.rs. Also, can we use the multipart feature for uploading? I couldn't find a solution for this. Finally, does it make sense to use unsafe?
`impl AsInterfaceRef for File {
fn from_value_ref(value: &Value) -> Result<&File> {
Ok(unsafe {
&*(value as *const Value as *const File)
})
}
} `
I will update the example
Hi @akelyasir, sorry for waiting for so long. I look it right now.
Hi @akelyasir, temporarily do this, I will update a patch version of the framework.
pub trait UploadInputTrait: Interface {
/// ## File
///
/// This interface field doesn't have a description.
fn file(&self) -> &File {
self.inner().get("file").unwrap().as_file().unwrap()
}
/// ## File
///
/// This interface field doesn't have a description.
fn set_file(&mut self, new_value: File) {
self.inner_mut().as_dictionary_mut().unwrap().insert("file".to_owned(), new_value.into()).unwrap();
}
}
This bug is fixed in Teo 0.2.36
@victorteokw
While reviewing the sample codes, I got an error again.
It gives an error after the entity is created.
I also want to use a structure like this as a field in the schema file. But it also gives errors.