Added transaction feature, fixed some mistakes

This commit is contained in:
2026-04-11 11:12:54 +03:00
parent 6872563c62
commit 545b05d5a0
37 changed files with 2509 additions and 115 deletions
+19
View File
@@ -0,0 +1,19 @@
export interface Family {
id: number
name: string
owner_id: number
telegram_chat_id: number | null
telegram_chat_name: string | null
created_at: string
updated_at: string
}
export async function getFamilyById(id: number): Promise<Family> {
const response = await fetch(`/api/v1/families/${id}`)
if (!response.ok) {
throw new Error(`Failed to fetch family: ${response.status}`)
}
return response.json() as Promise<Family>
}