mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-07-09 11:26:00 +00:00
refactor: remove exports internos sem uso
This commit is contained in:
@@ -31,19 +31,6 @@ import { addMonthsToPeriod, MONTH_NAMES } from "@/shared/utils/period";
|
||||
// Authorization Validation Functions
|
||||
// ============================================================================
|
||||
|
||||
export async function validatePayerOwnership(
|
||||
userId: string,
|
||||
payerId: string | null | undefined,
|
||||
): Promise<boolean> {
|
||||
if (!payerId) return true;
|
||||
|
||||
const pagador = await db.query.payers.findFirst({
|
||||
where: and(eq(payers.id, payerId), eq(payers.userId, userId)),
|
||||
});
|
||||
|
||||
return !!pagador;
|
||||
}
|
||||
|
||||
const normalizeIds = (ids: Array<string | null | undefined>) => [
|
||||
...new Set(ids.filter((id): id is string => Boolean(id))),
|
||||
];
|
||||
@@ -592,7 +579,7 @@ type SplitShareInput = {
|
||||
amount: number;
|
||||
};
|
||||
|
||||
export const resolveSplitShares = (data: {
|
||||
const resolveSplitShares = (data: {
|
||||
payerId?: string | null;
|
||||
secondaryPayerId?: string | null;
|
||||
splitShares?: SplitShareInput[];
|
||||
|
||||
Reference in New Issue
Block a user