update method
Implementation
Future<TEntity> update(
TEntity entity, {
RepositoryTransaction? transaction,
}) async {
validator.validateThrowing(entity);
var map = mapMapper.toMap(entity);
try {
map = await repository.update(
map,
principal,
transaction: transaction,
);
} on NotFound {
throw GrpcError.notFound();
} on Unauthorized {
throwUnauthorized();
}
entity = mapMapper.fromMap(map);
return entity;
}