diff --git a/apps/linkos/src/http/api/LinkAPI.ts b/apps/linkos/src/http/api/LinkAPI.ts index d2b52fa..faa80b1 100644 --- a/apps/linkos/src/http/api/LinkAPI.ts +++ b/apps/linkos/src/http/api/LinkAPI.ts @@ -14,6 +14,7 @@ import P from "@/providers/Providers.ts"; import Links from "@/http/api/Links.ts"; export default class LinkAPI { + private static readonly LINKS_TABLE = 'links'; private static producer: Producer | false; private static readonly path = '/usr/server/app/src/assets/'; @@ -177,7 +178,7 @@ export default class LinkAPI { if (linkFormRedis !== null) { shortLink = Global.ParseOrFalse(linkFormRedis); } else { - const link = await P.db(Links.TABLE).where('short', linkID); + const link = await P.db(LinkAPI.LINKS_TABLE).where('short', linkID); shortLink = link[0]; await RedisProvider.getClient().set(linkID, JSON.stringify(shortLink));