chore: moved fn up

This commit is contained in:
əlemi 2024-12-26 16:20:33 +01:00
parent cbcca3e8bb
commit 54b05f79ed
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -160,6 +160,11 @@ impl Context {
id.starts_with(self.base()) id.starts_with(self.base())
} }
#[allow(unused)]
pub fn is_relay(&self, id: &str) -> bool {
self.0.relay.sources.contains(id) || self.0.relay.sinks.contains(id)
}
pub async fn find_internal(&self, id: &str) -> Result<Option<Internal>, DbErr> { pub async fn find_internal(&self, id: &str) -> Result<Option<Internal>, DbErr> {
if let Some(internal) = model::object::Entity::ap_to_internal(id, self.db()).await? { if let Some(internal) = model::object::Entity::ap_to_internal(id, self.db()).await? {
return Ok(Some(Internal::Object(internal))); return Ok(Some(Internal::Object(internal)));
@ -181,11 +186,6 @@ impl Context {
waker.wake(); waker.wake();
} }
} }
#[allow(unused)]
pub fn is_relay(&self, id: &str) -> bool {
self.0.relay.sources.contains(id) || self.0.relay.sinks.contains(id)
}
} }
pub enum Internal { pub enum Internal {