refactor(api-server): narrow puzzle state surface
This commit is contained in:
@@ -46,6 +46,21 @@ impl SpacetimeClient {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn get_asset_object(
|
||||
&self,
|
||||
asset_object_id: String,
|
||||
) -> Result<Option<AssetObjectRecord>, SpacetimeClientError> {
|
||||
self.read_after_connect("get_asset_object", move |connection| {
|
||||
Ok(connection
|
||||
.db()
|
||||
.asset_object()
|
||||
.asset_object_id()
|
||||
.find(&asset_object_id)
|
||||
.map(map_asset_object_row))
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn bind_asset_object_to_entity(
|
||||
&self,
|
||||
input: module_assets::AssetEntityBindingInput,
|
||||
|
||||
Reference in New Issue
Block a user