Major refactoring and fixes.

* Split Node into multiple types and make sure fields are actually set
  when type says so.
* Refactor request handling.
* Start getting rid of moment as a dependency by using
  UnixTimestampSeconds instead.
This commit is contained in:
baldo 2022-07-21 18:39:33 +02:00
parent cfa784dfe2
commit 250353edbf
16 changed files with 676 additions and 455 deletions
server/resources

View file

@ -1,12 +1,6 @@
import {success} from "../utils/resources";
import {handleJSON} from "../utils/resources";
import {version} from "../config";
import {Request, Response} from "express";
export function get (req: Request, res: Response): void {
success(
res,
{
version
}
);
}
export const get = handleJSON(async () => ({
version
}));