Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/server/api/schema/shares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,19 @@ export const CreateShareSchema = ShareSchema.omit({
createdAt: true,
updatedAt: true,
companyId: true,
}).openapi({
description: "Issue shares to a stakeholder in a company.",
});
})
.strict()
.openapi({
description: "Issue shares to a stakeholder in a company.",
});

export const UpdateShareSchema = ShareSchema.omit({
id: true,
createdAt: true,
updatedAt: true,
})
.partial()
.strict()
.refine(
(data) => {
return Object.values(data).some((value) => value !== undefined);
Expand Down
7 changes: 6 additions & 1 deletion src/server/api/schema/stakeholder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,19 @@ export const CreateStakeholderSchema = z.array(
id: true,
createdAt: true,
updatedAt: true,
}),
})
.strict()
.openapi({
description: "Add one or more stakeholder accounts to a company.",
}),
);
export const UpdateStakeholderSchema = StakeholderSchema.omit({
id: true,
createdAt: true,
updatedAt: true,
})
.partial()
.strict()
.refine(
(data) => {
return Object.values(data).some((value) => value !== undefined);
Expand Down