Add receive endpoint for megabytes transfered

This commit is contained in:
Owen Schwartz
2024-09-28 23:51:52 -04:00
parent 0d91966609
commit 5a3e1444d1
7 changed files with 82 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import { Request, Response, NextFunction } from 'express';
import { DrizzleError, eq } from 'drizzle-orm';
import { sites, resources, targets, exitNodes } from '../../db/schema';
import db from '../../db';
import { sites, resources, targets, exitNodes } from '@server/db/schema';
import db from '@server/db';
export const getConfig = async (req: Request, res: Response, next: NextFunction): Promise<void> => {
try {
@@ -51,7 +51,6 @@ export const getConfig = async (req: Request, res: Response, next: NextFunction)
peers,
};
res.json(config);
} catch (error) {
console.error('Error querying database:', error);