diff --git a/plume-models/src/instance.rs b/plume-models/src/instance.rs index f8cb66cb..77f6f1b0 100644 --- a/plume-models/src/instance.rs +++ b/plume-models/src/instance.rs @@ -79,6 +79,13 @@ impl Instance { *LOCAL_INSTANCE.write().unwrap() = Instance::get_local_uncached(conn).ok(); } + pub fn get_locals(conn: &Connection) -> Result> { + instances::table + .filter(instances::local.eq(true)) + .load::(conn) + .map_err(Error::from) + } + pub fn get_remotes(conn: &Connection) -> Result> { instances::table .filter(instances::local.eq(false))