chore: moved fn up
This commit is contained in:
parent
cbcca3e8bb
commit
54b05f79ed
1 changed files with 5 additions and 5 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue