Skip to content

Commit

Permalink
fix(backend): Adding links table const
Browse files Browse the repository at this point in the history
Signed-off-by: Binyamin Yawitz <316103+byawitz@users.noreply.github.com>
  • Loading branch information
byawitz committed Apr 2, 2024
1 parent ff00d9b commit 205e831
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/linkos/src/http/api/LinkAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/';

Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 205e831

Please sign in to comment.