diff --git a/src/routes/RouteFactory.ts b/src/routes/RouteFactory.ts index 9d75fad..76a7cac 100644 --- a/src/routes/RouteFactory.ts +++ b/src/routes/RouteFactory.ts @@ -12,6 +12,7 @@ import { IDatabase } from '../database/IDatabase.js'; import { RouteComment } from './RouteComment.js'; import { RouteRoot } from './RouteRoot.js'; import { RouteNotification } from './RouteNotification.js'; +import { RouteFriends } from './RouteFriends.js'; export class RouteFactory { public app: Express; @@ -36,5 +37,6 @@ export class RouteFactory { RouteComment.register(this); RouteRoot.register(this); RouteNotification.register(this); + RouteFriends.register(this); } } \ No newline at end of file diff --git a/src/routes/RouteFriends.ts b/src/routes/RouteFriends.ts index 2fa7308..4405650 100644 --- a/src/routes/RouteFriends.ts +++ b/src/routes/RouteFriends.ts @@ -1,7 +1,7 @@ import { FriendLink } from "../database/FriendLink.js"; import { RouteFactory } from "./RouteFactory.js"; -class RouteFriends { +export class RouteFriends { public static register(inst: RouteFactory) { inst.app.get("/api/friends", async (req, res) => { const friends = await inst.db.getEntities(FriendLink);