mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
feat: improved abilities of plugins, moved schema fns to ctx
This commit is contained in:
@@ -225,7 +225,7 @@ export class DataController extends Controller {
|
||||
},
|
||||
);
|
||||
|
||||
return hono.all("*", (c) => c.notFound());
|
||||
return hono;
|
||||
}
|
||||
|
||||
private getEntityRoutes() {
|
||||
|
||||
@@ -12,6 +12,15 @@ export class RelationAccessor {
|
||||
return this._relations;
|
||||
}
|
||||
|
||||
exists(relation: EntityRelation): boolean {
|
||||
return this._relations.some(
|
||||
(r) =>
|
||||
r.source.entity.name === relation.source.entity.name &&
|
||||
r.target.entity.name === relation.target.entity.name &&
|
||||
r.type === relation.type,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches for the relations of [entity_name]
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user