Registry testing - all tests passing
This commit is contained in:
@@ -351,9 +351,13 @@ impl RequestHandler for Server {
|
||||
set_account_id_if_missing(&mut req.account_id, access_token);
|
||||
access_token.assert_is_member(req.account_id)?;
|
||||
|
||||
self.registry_get(method_name.obj.unwrap_registry(), req, access_token)
|
||||
.await?
|
||||
.into()
|
||||
Box::pin(self.registry_get(
|
||||
method_name.obj.unwrap_registry(),
|
||||
req,
|
||||
access_token,
|
||||
))
|
||||
.await?
|
||||
.into()
|
||||
}
|
||||
},
|
||||
RequestMethod::Query(req) => match req {
|
||||
@@ -426,9 +430,13 @@ impl RequestHandler for Server {
|
||||
set_account_id_if_missing(&mut req.account_id, access_token);
|
||||
access_token.assert_is_member(req.account_id)?;
|
||||
|
||||
self.registry_query(method_name.obj.unwrap_registry(), req, access_token)
|
||||
.await?
|
||||
.into()
|
||||
Box::pin(self.registry_query(
|
||||
method_name.obj.unwrap_registry(),
|
||||
req,
|
||||
access_token,
|
||||
))
|
||||
.await?
|
||||
.into()
|
||||
}
|
||||
},
|
||||
RequestMethod::Set(req) => match req {
|
||||
@@ -536,12 +544,12 @@ impl RequestHandler for Server {
|
||||
set_account_id_if_missing(&mut req.account_id, access_token);
|
||||
access_token.assert_is_member(req.account_id)?;
|
||||
|
||||
self.registry_set(
|
||||
Box::pin(self.registry_set(
|
||||
method_name.obj.unwrap_registry(),
|
||||
req,
|
||||
access_token,
|
||||
session,
|
||||
)
|
||||
))
|
||||
.await?
|
||||
.into()
|
||||
}
|
||||
|
||||
@@ -321,6 +321,7 @@ impl RegistrySet for Server {
|
||||
|
||||
if is_create {
|
||||
// Patch object
|
||||
|
||||
match new_object.patch(
|
||||
JsonPointerPatch::new(&JsonPointer::new(vec![]))
|
||||
.with_create(true)
|
||||
|
||||
Reference in New Issue
Block a user