added utils for unauth, verify, and response

This commit is contained in:
Milo Schwartz
2024-10-02 20:42:50 -04:00
parent d1e198fe55
commit 44e020784b
11 changed files with 125 additions and 69 deletions

View File

@@ -1,17 +1,19 @@
import { Request, Response, NextFunction } from 'express';
import { Request, Response, NextFunction } from "express";
import response from "@server/utils/response";
import HttpCode from '@server/types/HttpCode';
import HttpCode from "@server/types/HttpCode";
// define zod type here
export async function createSite(req: Request, res: Response, next: NextFunction): Promise<any> {
return res.status(HttpCode.OK).send(
response<null>({
data: null,
success: true,
error: false,
message: "Logged in successfully",
status: HttpCode.OK,
}),
);
export async function createSite(
req: Request,
res: Response,
next: NextFunction,
): Promise<any> {
return response<null>(res, {
data: null,
success: true,
error: false,
message: "Logged in successfully",
status: HttpCode.OK,
});
}