setup and invite

This commit is contained in:
Julian Krauser 2024-08-25 13:36:19 +02:00
parent 03e0f90279
commit 7df7cf2697
23 changed files with 515 additions and 43 deletions

View file

@ -0,0 +1,12 @@
import { Request, Response } from "express";
import UserService from "../service/userService";
import CustomRequestException from "../exceptions/customRequestException";
export default async function allowSetup(req: Request, res: Response, next: Function) {
let count = await UserService.count();
if (count != 0) {
throw new CustomRequestException(405, "service is already set up");
}
next();
}