chore: removed unused middleware (#1678)

This commit is contained in:
Joel Solano
2025-03-14 00:11:01 +03:00
committed by GitHub
parent 2ca71ee3cb
commit 8e1085eddb
@@ -1,18 +0,0 @@
import { type UserWithRole } from "./admin";
import { APIError, createAuthMiddleware, getSessionFromCtx } from "../../api";
import { type Session } from "../../types";
export const adminMiddleware = createAuthMiddleware(async (ctx) => {
const session = await getSessionFromCtx(ctx);
if (!session?.session) {
throw new APIError("UNAUTHORIZED");
}
return {
session,
} as {
session: {
user: UserWithRole;
session: Session;
};
};
});