fix: open-api doc generation failing, post patch and delete not exported (#1565)
This commit is contained in:
@@ -503,7 +503,7 @@ export const userRouter = createTRPCRouter({
|
||||
}),
|
||||
});
|
||||
|
||||
const createUserAsync = async (db: Database, input: z.infer<typeof validation.user.baseCreate>) => {
|
||||
const createUserAsync = async (db: Database, input: Omit<z.infer<typeof validation.user.baseCreate>, "groupIds">) => {
|
||||
const salt = await createSaltAsync();
|
||||
const hashedPassword = await hashPasswordAsync(input.password, salt);
|
||||
|
||||
|
||||
16
packages/api/src/test/open-api.spec.ts
Normal file
16
packages/api/src/test/open-api.spec.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { expect, test, vi } from "vitest";
|
||||
|
||||
import { openApiDocument } from "../open-api";
|
||||
|
||||
vi.mock("@homarr/auth", () => ({}));
|
||||
|
||||
test("OpenAPI documentation should be generated", () => {
|
||||
// Arrange
|
||||
const base = "https://homarr.dev";
|
||||
|
||||
// Act
|
||||
const act = () => openApiDocument(base);
|
||||
|
||||
// Assert
|
||||
expect(act).not.toThrow();
|
||||
});
|
||||
Reference in New Issue
Block a user